summaryrefslogtreecommitdiff
path: root/core/variant
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-09-29 09:18:07 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-09-29 10:38:21 +0300
commitea1848ce0a5f03c3a9f7e0a221350f4f4044bb08 (patch)
treefdbb5979dfe5f81a4d3e53ea71f625d84848e730 /core/variant
parentf8745f2f71c79972df66f17a3da75f6e328bc55d (diff)
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 7372c60754..cfea9ea663 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;