Skip to content

Commit

Permalink
Make the PIDHandler class non-copyable (#390)
Browse files Browse the repository at this point in the history
* Make the PIDHandler class non-copyable

* Add a comment about the deleted copy constructor and assignment

---------

Co-authored-by: jmcarcell <[email protected]>
  • Loading branch information
jmcarcell and jmcarcell authored Dec 19, 2024
1 parent 2130930 commit 3eec167
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/include/edm4hep/utils/ParticleIDUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ class PIDHandler {
public:
PIDHandler() = default;
~PIDHandler() = default;
PIDHandler(const PIDHandler&) = default;
PIDHandler& operator=(const PIDHandler&) = default;
// Copies are not allowed to avoid copying the internal maps
PIDHandler(const PIDHandler&) = delete;
PIDHandler& operator=(const PIDHandler&) = delete;
PIDHandler(PIDHandler&&) = default;
PIDHandler& operator=(PIDHandler&&) = default;

Expand Down

0 comments on commit 3eec167

Please sign in to comment.