mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Fix named enums to use int64 type
This commit is contained in:
parent
2f0d3d5424
commit
f11b66b084
3 changed files with 3 additions and 4 deletions
|
|
@ -2432,9 +2432,8 @@ Error GDScriptCompiler::_parse_class_level(GDScript *p_script, const GDScriptPar
|
|||
// TODO: Make enums not be just a dictionary?
|
||||
Dictionary new_enum;
|
||||
for (int j = 0; j < enum_n->values.size(); j++) {
|
||||
int value = enum_n->values[j].value;
|
||||
// Needs to be string because Variant::get will convert to String.
|
||||
new_enum[String(enum_n->values[j].identifier->name)] = value;
|
||||
new_enum[String(enum_n->values[j].identifier->name)] = enum_n->values[j].value;
|
||||
}
|
||||
|
||||
p_script->constants.insert(enum_n->identifier->name, new_enum);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue