From 9c4d7a286fc7d5bf8385dc886712724e201e99d2 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Sun, 26 Sep 2021 11:06:36 +0200 Subject: [PATCH] memory: avoid warnings due to unused parameters --- src/entt/core/memory.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/entt/core/memory.hpp b/src/entt/core/memory.hpp index d57e7a89a..965bc3f2e 100644 --- a/src/entt/core/memory.hpp +++ b/src/entt/core/memory.hpp @@ -57,11 +57,10 @@ constexpr void propagate_on_container_move_assignment([[maybe_unused]] Allocator * @param rhs Another valid allocator. */ template -constexpr void propagate_on_container_swap(Allocator &lhs, Allocator &rhs) ENTT_NOEXCEPT { - constexpr auto pocs = std::allocator_traits::propagate_on_container_swap::value; - ENTT_ASSERT(pocs || lhs == rhs, "Cannot swap the containers"); +constexpr void propagate_on_container_swap([[maybe_unused]] Allocator &lhs, [[maybe_unused]] Allocator &rhs) ENTT_NOEXCEPT { + ENTT_ASSERT(std::allocator_traits::propagate_on_container_swap::value || lhs == rhs, "Cannot swap the containers"); - if constexpr(pocs) { + if constexpr(std::allocator_traits::propagate_on_container_swap::value) { using std::swap; swap(lhs, rhs); }