QFixed{,Size}: reformulate some functions in a constexpr-friendly way
authorMarc Mutz <marc.mutz@kdab.com>
Wed, 22 Feb 2012 14:18:27 +0000 (15:18 +0100)
committerQt by Nokia <qt-info@nokia.com>
Sun, 26 Feb 2012 12:23:49 +0000 (13:23 +0100)
commit3e4a3bafb639f2ec77d44c80662157745b68f546
treee9f2c5fc8adfbc6eaf99e146bf2711f8bb9bb12a
parent47525e689694df0eec0a2f03e8bf67eed91da295
QFixed{,Size}: reformulate some functions in a constexpr-friendly way

The main change is the addition of a new constructor
that passes its argument into 'val' verbatim. In order
to disambiguate it from the existing QFixed(int)
constructor, it takes a second 'int' argument. This
is too ugly for public API, so it's private, and only
used by static QFixed fromFixed(int), which is the
existing named constructor with the same semantics.

The rest of the changes simply reformulate their
operations in terms of fromFixed().

This makes them ready to be constexpr'ed.

Change-Id: I2a3813d62bd4124064755de6b00526a60fc82c1d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/gui/painting/qfixed_p.h