Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • athena athena
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Jira
    • Jira
  • Merge requests 142
    • Merge requests 142
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Repository
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • atlasatlas
  • athenaathena
  • Merge requests
  • !47349

Remove thread unsafe registerColorCode

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Christos Anastopoulos requested to merge ATLAS-EGamma/athena:ITrackingVolumeCreator_return_nonConst_factory into master Oct 18, 2021
  • Overview 7
  • Commits 4
  • Pipelines 2
  • Changes 19

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 Oct 19, 2021 by Christos Anastopoulos
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ITrackingVolumeCreator_return_nonConst_factory