Browse Source

algorithm: instruct the linter to trust me

skypjack 1 year ago
parent
commit
852aa2969d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/entt/core/algorithm.hpp

+ 2 - 0
src/entt/core/algorithm.hpp

@@ -58,9 +58,11 @@ struct insertion_sort {
                 auto value = std::move(*it);
                 auto value = std::move(*it);
                 auto pre = it;
                 auto pre = it;
 
 
+                // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic)
                 for(; pre > first && compare(value, *(pre - 1)); --pre) {
                 for(; pre > first && compare(value, *(pre - 1)); --pre) {
                     *pre = std::move(*(pre - 1));
                     *pre = std::move(*(pre - 1));
                 }
                 }
+                // NOLINTEND(cppcoreguidelines-pro-bounds-pointer-arithmetic)
 
 
                 *pre = std::move(value);
                 *pre = std::move(value);
             }
             }