From 1e1dee88b794fb60d7ebd4ef04f4d80b6cd9c875 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 25 Sep 2023 08:50:16 +0200 Subject: [PATCH] registry: avoid warnings due to unused variables --- src/entt/entity/registry.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/entt/entity/registry.hpp b/src/entt/entity/registry.hpp index e49f0212d..5c55fada7 100644 --- a/src/entt/entity/registry.hpp +++ b/src/entt/entity/registry.hpp @@ -830,7 +830,7 @@ public: * @return True if the entity is part of all the storage, false otherwise. */ template - [[nodiscard]] bool all_of(const entity_type entt) const { + [[nodiscard]] bool all_of([[maybe_unused]] const entity_type entt) const { if constexpr(sizeof...(Type) == 1u) { auto *cpool = assure...>(); return cpool && cpool->contains(entt); @@ -847,7 +847,7 @@ public: * otherwise. */ template - [[nodiscard]] bool any_of(const entity_type entt) const { + [[nodiscard]] bool any_of([[maybe_unused]] const entity_type entt) const { return (all_of(entt) || ...); }