diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-06-17 21:05:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-17 21:05:51 +0200 |
commit | dd93ae63fa482a5955cae874300648a6bf4729fb (patch) | |
tree | 4075d2473c32b1d65d7df868cf046a86e93c8a39 /core/variant | |
parent | d2be5416ef2f759df7b89c4a22b4d36a185feb25 (diff) | |
parent | 860e24683fd4ee627a3a950418dbd2b4cc6fe78b (diff) |
Merge pull request #61991 from bruvzg/property_shortcut
Make enum/constant binds 64-bit.
Diffstat (limited to 'core/variant')
-rw-r--r-- | core/variant/variant_call.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<StringName, int> value; + HashMap<StringName, int64_t> value; #ifdef DEBUG_ENABLED List<StringName> 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<StringName> *p_c for (const List<StringName>::Element *E = cd.value_ordered.front(); E; E = E->next()) { p_constants->push_back(E->get()); #else - for (const KeyValue<StringName, int> &E : cd.value) { + for (const KeyValue<StringName, int64_t> &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<StringName, int>::Iterator E = cd.value.find(p_value); + HashMap<StringName, int64_t>::Iterator E = cd.value.find(p_value); if (!E) { HashMap<StringName, Variant>::Iterator F = cd.variant_value.find(p_value); if (F) { |