summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-29 10:44:22 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-29 10:44:22 +0200
commit6991e9b43d0954018e1a82fa4cb28af42632ae92 (patch)
tree4082eccdb747de8953f8a0812dc8111b31d90b81 /core/variant
parent5bcd019ee9151b9040dc91e2aa4aef4cbbaa25fe (diff)
parentea1848ce0a5f03c3a9f7e0a221350f4f4044bb08 (diff)
Merge pull request #66583 from bruvzg/constexpr
Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings.
Diffstat (limited to 'core/variant')
-rw-r--r--core/variant/type_info.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/variant/type_info.h b/core/variant/type_info.h
index 05ed6559fd..e355053296 100644
--- a/core/variant/type_info.h
+++ b/core/variant/type_info.h
@@ -276,7 +276,7 @@ inline String enum_qualified_name_to_class_info_name(const String &p_qualified_n
template <typename T>
inline StringName __constant_get_enum_name(T param, const String &p_constant) {
- if (GetTypeInfo<T>::VARIANT_TYPE == Variant::NIL) {
+ if constexpr (GetTypeInfo<T>::VARIANT_TYPE == Variant::NIL) {
ERR_PRINT("Missing VARIANT_ENUM_CAST for constant's enum: " + p_constant);
}
return GetTypeInfo<T>::get_class_info().class_name;