From 88a43b7039068b3189bd4335c501918cd2cbdd02 Mon Sep 17 00:00:00 2001 From: Rob Blanckaert Date: Sat, 12 Apr 2025 13:18:12 -0700 Subject: [PATCH] Supress unused paramater warning conflicting with if constexpr --- core/os/memory.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/os/memory.h b/core/os/memory.h index 9753d3c6481..7efa85e7f47 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -200,6 +200,8 @@ template _FORCE_INLINE_ void memnew_arr_placement(T *p_start, size_t p_num) { if constexpr (std::is_trivially_constructible_v && !p_ensure_zero) { // Don't need to do anything :) + (void)p_start; + (void)p_num; } else if constexpr (is_zero_constructible_v) { // Can optimize with memset. memset(static_cast(p_start), 0, p_num * sizeof(T));