diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ecca3d6..0ec8388d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -492,6 +492,7 @@ if(RUN_CLANG_TIDY) "cppcoreguidelines-narrowing-conventions" "cppcoreguidelines-no-malloc" "cppcoreguidelines-pro-bounds-constant-array-index" + "cppcoreguidelines-pro-bounds-pointer-arithmetic" "cppcoreguidelines-pro-type-const-cast" "cppcoreguidelines-pro-type-cstyle-cast" "cppcoreguidelines-pro-type-reinterpret-cast" diff --git a/src/api/game/load_order_handler.cpp b/src/api/game/load_order_handler.cpp index 3bf0a1b8..1b2b65ef 100644 --- a/src/api/game/load_order_handler.cpp +++ b/src/api/game/load_order_handler.cpp @@ -123,6 +123,7 @@ std::vector LoadOrderHandler::GetLoadOrder() const { HandleError("get the load order", ret); + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) std::vector loadOrder(pluginArr, pluginArr + pluginArrSize); lo_free_string_array(pluginArr, pluginArrSize); @@ -142,6 +143,7 @@ std::vector LoadOrderHandler::GetActivePlugins() const { HandleError("get active plugins", ret); + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) std::vector loadOrder(pluginArr, pluginArr + pluginArrSize); lo_free_string_array(pluginArr, pluginArrSize); @@ -162,6 +164,7 @@ std::vector LoadOrderHandler::GetImplicitlyActivePlugins() const { HandleError("get implicitly active plugins", ret); + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) std::vector loadOrder(pluginArr, pluginArr + pluginArrSize); lo_free_string_array(pluginArr, pluginArrSize); diff --git a/src/api/plugin.cpp b/src/api/plugin.cpp index 899b39f1..fcd93da6 100644 --- a/src/api/plugin.cpp +++ b/src/api/plugin.cpp @@ -118,6 +118,7 @@ std::vector Plugin::GetMasters() const { " : esplugin error code: " + std::to_string(ret)); } + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic) std::vector mastersVec(masters, masters + numMasters); esp_string_array_free(masters, numMasters);