summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainterpath.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-04-24 10:24:44 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-05-04 13:49:27 +0000
commitec73b5d4b83df954ea68076c51e8ab6a85477a0d (patch)
treeb6adc3e754a3ee8f70700c2afc8db6bcc53b273c /src/gui/painting/qpainterpath.h
parentcecd52b89ae6c58476c39079830908d22f52ef2d (diff)
QQuaternion: prepare isNull(), isIdentity() for constexpr'ification
...by dropping the use of qIsNull(), which, in Qt 4, distinguished between -0.0f and +0.0f. But mathematically, whether x, y, z are ±0 doesn't change the fact that the result is the identity element (x, y, z should contain the identity element for addition and w the one for multiplication), or the null element (additive identity). So using qIsNull() was wrong even in Qt 4. In Qt 5, qIsNull() returns true for both ±0, so we can just as well compare to 0.0f instead, which allows to mark these functions constexpr (qIsNull() can't be). Do so. Change-Id: I78b1fa7890036dd3cb4de7f90b75d439f9835e73 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/gui/painting/qpainterpath.h')
0 files changed, 0 insertions, 0 deletions