From 56d922999f422171af7b1f1c8344cfe8762c299b Mon Sep 17 00:00:00 2001 From: DH Date: Sun, 28 Nov 2021 09:21:41 +0200 Subject: [PATCH] Fixed debug build compilation errors const_str_t constructor without arguments shoud be constexpr for usage as default initializer in constexpr functions --- rpcs3/util/types.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/util/types.hpp b/rpcs3/util/types.hpp index f2600fe465..d045c3dfba 100644 --- a/rpcs3/util/types.hpp +++ b/rpcs3/util/types.hpp @@ -799,13 +799,13 @@ struct const_str_t { const usz size; - const union + union { const char8_t* chars; const char* chars2; }; - const_str_t() + constexpr const_str_t() : size(0) , chars(nullptr) { @@ -825,7 +825,7 @@ struct const_str_t { } - operator const char*() const + constexpr operator const char*() const { return std::launder(chars2); }