summaryrefslogtreecommitdiffstats
path: root/examples/sql/sqlbrowser/browser.cpp
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2021-08-31 14:38:52 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2021-09-02 16:35:12 +0200
commitf645bb8880df3cb7c9e51e6c3398485292926a3c (patch)
tree9672eaade93ed36b47a57e0b2f546e9eeb949e63 /examples/sql/sqlbrowser/browser.cpp
parentf266381b1ba427485e444640fcd6fb3f68a2b1bb (diff)
Replace implementation-specific zero test with plain comparison
Various double-to-string converters carefully omit the sign from -0.0, for which they need to test whether the double is zero. This was tested by a function that looked at the bytes of the double in an endian-specific way. Packaging a comparison to zero in a function seems to avoid the compiler warnings over double-comparison, so retain the function but make it simpler. The only available benchmark (QString's number_double benchmark) consistently shows a negligible improvement in performance. Change-Id: Id994177e21e4770ced904881d7e84a95cb727605 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'examples/sql/sqlbrowser/browser.cpp')
0 files changed, 0 insertions, 0 deletions