From 860e24683fd4ee627a3a950418dbd2b4cc6fe78b Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Mon, 9 May 2022 12:47:10 +0300 Subject: Make enum/constant binds 64-bit. --- core/variant/variant_call.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/variant/variant_call.cpp') diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index b335f2fcf4..6e8dc64811 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -919,7 +919,7 @@ struct _VariantCall { } struct ConstantData { - HashMap value; + HashMap value; #ifdef DEBUG_ENABLED List value_ordered; #endif @@ -931,7 +931,7 @@ struct _VariantCall { static ConstantData *constant_data; - static void add_constant(int p_type, StringName p_constant_name, int p_constant_value) { + static void add_constant(int p_type, StringName p_constant_name, int64_t p_constant_value) { constant_data[p_type].value[p_constant_name] = p_constant_value; #ifdef DEBUG_ENABLED constant_data[p_type].value_ordered.push_back(p_constant_name); @@ -1245,7 +1245,7 @@ void Variant::get_constants_for_type(Variant::Type p_type, List *p_c for (const List::Element *E = cd.value_ordered.front(); E; E = E->next()) { p_constants->push_back(E->get()); #else - for (const KeyValue &E : cd.value) { + for (const KeyValue &E : cd.value) { p_constants->push_back(E.key); #endif } @@ -1281,7 +1281,7 @@ Variant Variant::get_constant_value(Variant::Type p_type, const StringName &p_va ERR_FAIL_INDEX_V(p_type, Variant::VARIANT_MAX, 0); _VariantCall::ConstantData &cd = _VariantCall::constant_data[p_type]; - HashMap::Iterator E = cd.value.find(p_value); + HashMap::Iterator E = cd.value.find(p_value); if (!E) { HashMap::Iterator F = cd.variant_value.find(p_value); if (F) { -- cgit v1.2.3