Просмотр исходного кода

monostate: make it clear to the linter that we want value and monostate_v to be global

Michele Caini 1 год назад
Родитель
Сommit
86cdb6f55d
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      src/entt/core/monostate.hpp

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

@@ -43,6 +43,7 @@ struct monostate {
 
 private:
     template<typename Type>
+    // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
     inline static ENTT_MAYBE_ATOMIC(Type) value{};
 };
 
@@ -51,6 +52,7 @@ private:
  * @tparam Value Value used to differentiate between different variables.
  */
 template<id_type Value>
+// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
 inline monostate<Value> monostate_v{};
 
 } // namespace entt