TrkGeometry Layers Part1: Create non-const overloads set/resize/move , remove some mutable, mark const one as unsafe
The Layer class and (its derivatives) has
a few methods named like set
,move
,resize
and combinations of these worlds.
In reality none of them are really const
as they modify the object , which then leads to mutable state.
What is going on in this MR (most of the changes are in the header files) :
- Remove a bunch of mutable
- Make the set/move/resize changing operations/methods non-const
- For combatibility still provide const ones (trying to not replicate implementations)
- Last but quite importand !! Mark the const ones explicitly as unsafe -->
ATLAS_NOT_THREAD_SAFE
Hopefully most of the clients will not really modify/apply setters to const objects (or movers or resizers), so we should be able to remove a few of the const / unsafe overlaods. Also marking them should help catch such cases
Also, still there are remain a few mutable
in Layer.h
some are accessed via friendship which can throw another spanner . Leaving them for Part2 or Part3 ....
Edited by Christos Anastopoulos