You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Use OrderedHashMap for enum_values
This commit is contained in:
committed by
Nathan Franke
parent
ed395c6b99
commit
b5b75cad43
@@ -3510,12 +3510,12 @@ bool GDScriptParser::export_annotations(const AnnotationNode *p_annotation, Node
|
|||||||
variable->export_info.hint = PROPERTY_HINT_ENUM;
|
variable->export_info.hint = PROPERTY_HINT_ENUM;
|
||||||
|
|
||||||
String enum_hint_string;
|
String enum_hint_string;
|
||||||
for (const Map<StringName, int>::Element *E = export_type.enum_values.front(); E; E = E->next()) {
|
for (OrderedHashMap<StringName, int>::Element E = export_type.enum_values.front(); E; E = E.next()) {
|
||||||
enum_hint_string += E->key().operator String().capitalize().xml_escape();
|
enum_hint_string += E.key().operator String().capitalize().xml_escape();
|
||||||
enum_hint_string += ":";
|
enum_hint_string += ":";
|
||||||
enum_hint_string += String::num_int64(E->get()).xml_escape();
|
enum_hint_string += String::num_int64(E.value()).xml_escape();
|
||||||
|
|
||||||
if (E->next()) {
|
if (E.next()) {
|
||||||
enum_hint_string += ",";
|
enum_hint_string += ",";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ public:
|
|||||||
ClassNode *class_type = nullptr;
|
ClassNode *class_type = nullptr;
|
||||||
|
|
||||||
MethodInfo method_info; // For callable/signals.
|
MethodInfo method_info; // For callable/signals.
|
||||||
Map<StringName, int> enum_values; // For enums.
|
OrderedHashMap<StringName, int> enum_values; // For enums.
|
||||||
|
|
||||||
_FORCE_INLINE_ bool is_set() const { return kind != UNRESOLVED; }
|
_FORCE_INLINE_ bool is_set() const { return kind != UNRESOLVED; }
|
||||||
_FORCE_INLINE_ bool has_no_type() const { return type_source == UNDETECTED; }
|
_FORCE_INLINE_ bool has_no_type() const { return type_source == UNDETECTED; }
|
||||||
|
|||||||
Reference in New Issue
Block a user