Skip to content

Commit

Permalink
[rteutils] Fix CollectionUtils::MergeStrVecMap (#987) (#1653)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Brondani <[email protected]>
  • Loading branch information
grasci-arm and brondani authored Jul 19, 2024
1 parent 7f59e8a commit d058c9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/rteutils/src/CollectionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ void CollectionUtils::RemoveDefines(vector<string>& dst, vector<string>& src) {

StrVecMap CollectionUtils::MergeStrVecMap(const StrVecMap& map1, const StrVecMap& map2) {
StrVecMap mergedMap(map1);
mergedMap.insert(map2.begin(), map2.end());
for (const auto& [key, vec] : map2) {
mergedMap[key].insert(mergedMap[key].end(), vec.begin(), vec.end());
}
return mergedMap;
}

Expand Down

0 comments on commit d058c9c

Please sign in to comment.