Replace map::insert
There are several instances in core
where insert
is used to add a key/value pair to a map, an action which will silently fail if the key already exists in the map. This has already caused major headaches in issue #91 (closed), which was fixed in !66 (merged), and is currently causing problems because it is used in Experiment::addPeakCollection
. The question remains whether to:
- Ensure that
insert
is the correct method to use here - Replace all
insert
withinsert_or_assign
(C++ 17) - Use something other than std::map.
Edited by Raza, Zamaan