diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-29 10:44:22 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-09-29 10:44:22 +0200 |
commit | 6991e9b43d0954018e1a82fa4cb28af42632ae92 (patch) | |
tree | 4082eccdb747de8953f8a0812dc8111b31d90b81 /core/variant | |
parent | 5bcd019ee9151b9040dc91e2aa4aef4cbbaa25fe (diff) | |
parent | ea1848ce0a5f03c3a9f7e0a221350f4f4044bb08 (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.h | 2 |
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; |