Skip to content

Commit

Permalink
fix(autoware_compare_map_segmentation): fix cppcheck constVariableRef…
Browse files Browse the repository at this point in the history
…erence (#9196)

Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored Nov 3, 2024
1 parent f13503a commit 3153252
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,13 @@ class VoxelGridDynamicMapLoader : public VoxelGridMapLoader
}
inline std::vector<std::string> getCurrentMapIDs()
{
std::vector<std::string> current_map_ids{};
std::lock_guard<std::mutex> lock(dynamic_map_loader_mutex_);
for (auto & kv : current_voxel_grid_dict_) {
current_map_ids.push_back(kv.first);
std::vector<std::string> current_map_ids;
{
std::lock_guard<std::mutex> lock(dynamic_map_loader_mutex_);
current_map_ids.reserve(current_voxel_grid_dict_.size());
for (const auto & kv : current_voxel_grid_dict_) {
current_map_ids.push_back(kv.first);
}
}
return current_map_ids;
}
Expand Down

0 comments on commit 3153252

Please sign in to comment.