From ea1848ce0a5f03c3a9f7e0a221350f4f4044bb08 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 29 Sep 2022 09:18:07 +0300 Subject: Use `constexpr` in the conditions with template parameters and `sizeof`s to suppress C4127 warnings. --- core/variant/type_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/variant') 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 inline StringName __constant_get_enum_name(T param, const String &p_constant) { - if (GetTypeInfo::VARIANT_TYPE == Variant::NIL) { + if constexpr (GetTypeInfo::VARIANT_TYPE == Variant::NIL) { ERR_PRINT("Missing VARIANT_ENUM_CAST for constant's enum: " + p_constant); } return GetTypeInfo::get_class_info().class_name; -- cgit v1.2.3