Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
8
Description
The get() functions return by out parameter. Out parameters have several drawbacks:
- they make the function awkward to use, because you have to declare variables in a separate statement before being able to pass them to the function
- compilers don't like out-parameters, because they're memory and not values, and they may alias each other or part of the QQuaternion from which they're being calculated
- the pointer have to be valid, introducing an extra set of preconditions on top of what the mathematical operation would require
So replace them with functions that return by struct.
Acceptance criteria:
- new value-returning functions added
- getX() functions inlined and reimplemented in terms of the value-returning functions
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-138199 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
656888,9 | QQuaternion: long live Axes / toAxes() | dev | qt/qtbase | Status: NEW | 0 | 0 |
657303,3 | QQuaternion: long live EulerAngles / eulerAngles() | dev | qt/qtbase | Status: NEW | 0 | 0 |