Clang tidy/format fixes for fix_stable_vector_memory_leak

This commit is contained in:
AdenKoperczak 2025-03-14 12:31:37 -04:00
parent 61ac1e5612
commit 3ef794a25e

View file

@ -1193,7 +1193,7 @@ void MapWidgetImpl::AddLayers()
std::string before = styleLayers_.front().toStdString(); std::string before = styleLayers_.front().toStdString();
// Loop through each custom layer in reverse order // Loop through each custom layer in reverse order
for (const auto & customLayer : std::ranges::reverse_view(customLayers)) for (const auto& customLayer : std::ranges::reverse_view(customLayers))
{ {
if (customLayer.type_ == types::LayerType::Map) if (customLayer.type_ == types::LayerType::Map)
{ {
@ -1214,6 +1214,8 @@ void MapWidgetImpl::AddLayers()
break; break;
} }
} }
// id_ is always < 4, so this is safe
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index)
else if (customLayer.displayed_[id_]) else if (customLayer.displayed_[id_])
{ {
// If the layer is displayed for the current map, add it // If the layer is displayed for the current map, add it