Skip to content

Commit 034e614

Browse files
committed
Merge pull request #105326 from basicer/fix-unused-paramater-warning
Supress unused paramater warning conflicting with if constexpr
2 parents 756053f + 88a43b7 commit 034e614

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/os/memory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ template <bool p_ensure_zero = false, typename T>
200200
_FORCE_INLINE_ void memnew_arr_placement(T *p_start, size_t p_num) {
201201
if constexpr (std::is_trivially_constructible_v<T> && !p_ensure_zero) {
202202
// Don't need to do anything :)
203+
(void)p_start;
204+
(void)p_num;
203205
} else if constexpr (is_zero_constructible_v<T>) {
204206
// Can optimize with memset.
205207
memset(static_cast<void *>(p_start), 0, p_num * sizeof(T));

0 commit comments

Comments
 (0)