summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2022-01-25 13:07:46 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-09 14:56:10 +0000
commitec0a5d1574daecc0a840c10f8734d0e859d47d2e (patch)
treed1efe7e1434cbfcff25df5f54f4ef15fe234bf38 /tests
parent661360bc08f55c6a9358219ceaf9f1d3093bf0d3 (diff)
Refine QTZP_win's msecsToDate() by trusting arithmetic
Division and modulo are guaranteed to be consistent, with the former truncating towards zero, so the latter giving a remainder that either is zero or has the same sign as the numerator. In particular, when the numerator is positive, the remainder is necessarily greater than minus it, so the formerly correct but unilluminating arithmetic necessarily gave the answer one and we can just --jd rather than doing anything cleverer. Assert the fact that ensures this. Change-Id: Ia718bb947192f1fd2eb36549be12d30e4ee03d58 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 9135531c33551e03ef2b7287830228def0a81f5a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions