summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qdebug.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-10-25 14:11:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-12-09 17:24:34 +0100
commitf9f1272e7c438b79591032877f2b386af8085c3f (patch)
tree4f2b76cce6a289af94247a259a3006baceb4d05c /src/corelib/io/qdebug.cpp
parent2bccacab21a02a07e4af9673ad48c9c36c934bb8 (diff)
QQuaternion: make methods constexpr, noexcept; fix style
The class stores all data inline, and most member functions are inline already with trivial arithmetic operations on those data members. So we can make the class almost completely constexpr. This includes member functions that construct or use QVector3D/4D, as those types are also fully constexpr. Almost all inline (and now constexpr) member functions can then also be made noexcept, with the exception of the division operators that don't check the divisor for 0. qFuzzyCompare(float, float) is not noexcept, but it has no preconditions and never throws, so we can make the QQuaternion overload noexcept. Remove const from values returned by arithmetic operators, and fix whitespace style in prototypes (also the few that are not already touched by the other changes). Prepare unexporting the class wholesale in Qt 7; we only have to export out-of-line functions, but can't make that change in Qt 6, as the implicitly defined special member functions are exported (at least on MSVC). Change-Id: I3e43232bf66009352e8de937c07b2985147fb33c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Sami Varanka <sami.varanka@qt.io>
Diffstat (limited to 'src/corelib/io/qdebug.cpp')
0 files changed, 0 insertions, 0 deletions