From 3ef794a25e4661a828722ab2e098402f062e1530 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Fri, 14 Mar 2025 12:31:37 -0400 Subject: [PATCH] Clang tidy/format fixes for fix_stable_vector_memory_leak --- scwx-qt/source/scwx/qt/map/map_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scwx-qt/source/scwx/qt/map/map_widget.cpp b/scwx-qt/source/scwx/qt/map/map_widget.cpp index 51aa98ef..466a03fe 100644 --- a/scwx-qt/source/scwx/qt/map/map_widget.cpp +++ b/scwx-qt/source/scwx/qt/map/map_widget.cpp @@ -1193,7 +1193,7 @@ void MapWidgetImpl::AddLayers() std::string before = styleLayers_.front().toStdString(); // 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) { @@ -1214,6 +1214,8 @@ void MapWidgetImpl::AddLayers() break; } } + // id_ is always < 4, so this is safe + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-constant-array-index) else if (customLayer.displayed_[id_]) { // If the layer is displayed for the current map, add it