Skip to content

Remove thread unsafe registerColorCode

We want to remove the "unsafe" overload.

   void registerColorCode ATLAS_NOT_THREAD_SAFE (unsigned int icolor) const;
  inline void TrackingVolume::registerColorCode(unsigned int icolor) const
  { const_cast<TrackingVolume&> (*this).registerColorCode(icolor);}

and keep the non const version of this function.

After removing it more of the uses of this overload were relating to objects that were created as const without needing to. e.g we could create the object as non-const, modify / register the color code and then return the object.

So fixed the clients accordingly.

There are cases where one needs to dig a bit deeper in to be sure , so here keep the const_cast there but keep it explicit/visible.

Edited by Christos Anastopoulos

Merge request reports