mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Add cppcoreguidelines-pro-bounds-pointer-arithmetic clang-tidy check
Suppress a few warnings where pointer arithmetic is unavoidable.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -123,6 +123,7 @@ std::vector<std::string> LoadOrderHandler::GetLoadOrder() const {
|
||||
|
||||
HandleError("get the load order", ret);
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
|
||||
std::vector<string> loadOrder(pluginArr, pluginArr + pluginArrSize);
|
||||
lo_free_string_array(pluginArr, pluginArrSize);
|
||||
|
||||
@@ -142,6 +143,7 @@ std::vector<std::string> LoadOrderHandler::GetActivePlugins() const {
|
||||
|
||||
HandleError("get active plugins", ret);
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
|
||||
std::vector<string> loadOrder(pluginArr, pluginArr + pluginArrSize);
|
||||
lo_free_string_array(pluginArr, pluginArrSize);
|
||||
|
||||
@@ -162,6 +164,7 @@ std::vector<std::string> LoadOrderHandler::GetImplicitlyActivePlugins() const {
|
||||
|
||||
HandleError("get implicitly active plugins", ret);
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
|
||||
std::vector<string> loadOrder(pluginArr, pluginArr + pluginArrSize);
|
||||
lo_free_string_array(pluginArr, pluginArrSize);
|
||||
|
||||
|
||||
@@ -118,6 +118,7 @@ std::vector<std::string> Plugin::GetMasters() const {
|
||||
" : esplugin error code: " + std::to_string(ret));
|
||||
}
|
||||
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
|
||||
std::vector<std::string> mastersVec(masters, masters + numMasters);
|
||||
esp_string_array_free(masters, numMasters);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user