Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138199

Provide by-value versions of QQuaternions's getX(T*...) functions

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Core: Other, GUI: Painting
    • 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

        For Gerrit Dashboard: QTBUG-138199
        # Subject Branch Project Status CR V

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are 2 open Gerrit changes