Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-4942

Fix type inference and return types makeMaskedImage et al

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw
    • Labels:
      None
    • Story Points:
      1
    • Team:
      Data Release Production

      Description

      The makeMaskedImage function and cousins like makeExposure don't do the type inference they're supposed to do in C++, because they use the old typename Image<T>::Ptr approach instead of PTR(Image<T>).

      They also return raw pointers, which is dangerous. They should be converted to return shared_ptrs. Note that this will have to include adjusting or removing Swig code (probably %newobject statements) that deal with taking ownership of the raw pointers.

        Attachments

          Issue Links

            Activity

            Hide
            swinbank John Swinbank added a comment -

            Looks like the use of pointers was modernized on f578559. Jim Bosch, does that address your concerns re type inference?

            Seems like there has been no change to the return type of makeMaskedImage in many years; that part of the ticket is still valid.

            Show
            swinbank John Swinbank added a comment - Looks like the use of pointers was modernized on f578559 . Jim Bosch , does that address your concerns re type inference? Seems like there has been no change to the return type of makeMaskedImage in many years; that part of the ticket is still valid.
            Hide
            jbosch Jim Bosch added a comment -

            Well, mostly.  That modernization didn't remove the now-unnecessary usage of typename before those arguments, which I'm frankly surprised is not a compiler error (and even if it's not, it's confusing to readers and should be changed).

            Show
            jbosch Jim Bosch added a comment - Well, mostly.  That modernization didn't remove the now-unnecessary usage of typename before those arguments, which I'm frankly surprised is not a compiler error (and even if it's not, it's confusing to readers and should be changed).

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              jbosch Jim Bosch
              Watchers:
              Jim Bosch, John Swinbank
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  CI Builds

                  No builds found.