Skip to content

Surface :: The transform does not need to be a CachedPointer

The main change is from

 CxxUtils::CachedUniquePtrT<Amg::Transform3D> m_transform; //!< Transform3D to orient surface w.r.t to global frame
  CxxUtils::CachedUniquePtrT<Amg::Vector3D> m_center;       //!< center position of the surface
  CxxUtils::CachedUniquePtrT<Amg::Vector3D> m_normal;       //!< normal vector of the surface

to

  std::unique_ptr<Amg::Transform3D> m_transform;           //!< Transform3D to orient surface w.r.t to global frame
  CxxUtils::CachedUniquePtr<Amg::Vector3D> m_center;       //!< center position of the surface
  CxxUtils::CachedUniquePtr<Amg::Vector3D> m_normal;       //!< normal vector of the surface

the transform is not really lazy initialized so can be a "plain" unique ptr, and for the lazy init is better to use the CachedUniquePtr rather than CachedUniquePtrT

template <class T>
using CachedUniquePtr = CachedUniquePtrT<const T>;
Edited by Christos Anastopoulos

Merge request reports