From 5a41d75eb85c0c3cfa4742b7f2b1a7c78f7f7119 Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 10 Feb 2020 12:06:22 +0300 Subject: [PATCH] Silence unused parameter warning --- rpcs3/util/fixed_typemap.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcs3/util/fixed_typemap.hpp b/rpcs3/util/fixed_typemap.hpp index c793f6981c..7e468a4beb 100644 --- a/rpcs3/util/fixed_typemap.hpp +++ b/rpcs3/util/fixed_typemap.hpp @@ -21,11 +21,11 @@ namespace stx template static void call_ctor(void*& ptr) noexcept { - // Call default constructor only if available - if constexpr (std::is_default_constructible_v) + // Don't overwrite if already exists + if (!ptr) { - // Don't overwrite if already exists - if (!ptr) + // Call default constructor only if available + if constexpr (std::is_default_constructible_v) { ptr = new T(); }