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

Replace deprecated C++98 coding patterns in afw

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: afw, geom
    • Story Points:
      9
    • Epic Link:
    • Team:
      Alert Production

      Description

      C++11 offers cleaner ways to perform certain common tasks that were difficult or required hacks in C++98. Code will be safer and more maintainable if it is updated to match C++11 recommendations.

      This ticket includes the following changes:

      • Replace 0 or NULL with nullptr.
      • Replace typedefs with type aliases.
      • Simplify existing template metaprogramming with <type_traits> components, if possible.
      • Make functions that just throw "never call this" exceptions deleted (note that any pybind11 wrappers must still throw exceptions).

      Any changes made on this ticket except the last item must not change the behavior of any class, even if that behavior is untested.

      The classes covered by this ticket are (based on assumed simplicity, and therefore subject to change):

      • afw::cameraGeom::CameraPoint
      • afw::cameraGeom::CameraSys
      • afw::cameraGeom::CameraSysPrefix
      • afw::cameraGeom::Orientation
      • afw::coord::Coord and its subclasses
      • afw::coord::Observatory
      • afw::coord::Weather
      • afw::detection::Threshold
      • afw::geom::Angle
      • afw::geom::AngleUnit
      • afw::geom::Box
      • afw::geom::CoordinateBase and its subclasses
      • afw::geom::CoordinateExpr
      • afw::geom::Span
      • afw::geom::SpherePoint
      • afw::geom::polygon::Polygon
      • afw::image::Calib
      • afw::image::Color
      • afw::image::DefectBase
      • afw::image::Filter
      • afw::image::FilterProperty
      • afw::math::FitResults
      • afw::math::Function and its subclasses
      • afw::math::MaskedVector
      • afw::math::Statistics
      • afw::table::BaseRecord and its subclasses
      • afw::table::ConstFunctorKey
      • afw::table::FieldBase and its subclasses
      • afw::table::InputFunctorKey and its subclasses
      • afw::table::KeyBase and its subclasses
      • afw::table::Match
      • afw::table::OutputFunctorKey and its subclasses
      • afw::table::ReferenceFunctorKey
      • afw::table::SchemaItem
      • afw::table::io::Persistable
      • afw::table::io::PersistableFacade

        Attachments

          Activity

          Hide
          krzys Krzysztof Findeisen added a comment -

          The use of nullptr should have been handled by DM-13744, other checks still necessary.

          Show
          krzys Krzysztof Findeisen added a comment - The use of nullptr should have been handled by DM-13744 , other checks still necessary.
          Hide
          pschella Pim Schellart [X] (Inactive) added a comment -

          The first two points are definitely automate able with clang-tidy. The last may also be. The third will be tricky though.

          Show
          pschella Pim Schellart [X] (Inactive) added a comment - The first two points are definitely automate able with clang-tidy . The last may also be. The third will be tricky though.

            People

            • Assignee:
              krzys Krzysztof Findeisen
              Reporter:
              krzys Krzysztof Findeisen
              Watchers:
              Krzysztof Findeisen, Pim Schellart [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel