Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
This commit is contained in:
@ -110,10 +110,10 @@ public:
|
||||
#ifdef DEBUG_METHODS_ENABLED
|
||||
List<StringName> constant_order;
|
||||
List<StringName> method_order;
|
||||
Set<StringName> methods_in_properties;
|
||||
RBSet<StringName> methods_in_properties;
|
||||
List<MethodInfo> virtual_methods;
|
||||
Map<StringName, MethodInfo> virtual_methods_map;
|
||||
Map<StringName, Vector<Error>> method_error_values;
|
||||
HashMap<StringName, MethodInfo> virtual_methods_map;
|
||||
HashMap<StringName, Vector<Error>> method_error_values;
|
||||
#endif
|
||||
HashMap<StringName, PropertySetGet> property_setget;
|
||||
|
||||
@ -149,14 +149,14 @@ public:
|
||||
static void _add_class2(const StringName &p_class, const StringName &p_inherits);
|
||||
|
||||
static HashMap<StringName, HashMap<StringName, Variant>> default_values;
|
||||
static Set<StringName> default_values_cached;
|
||||
static RBSet<StringName> default_values_cached;
|
||||
|
||||
// Native structs, used by binder
|
||||
struct NativeStruct {
|
||||
String ccode; // C code to create the native struct, fields separated by ; Arrays accepted (even containing other structs), also function pointers. All types must be Godot types.
|
||||
uint64_t struct_size; // local size of struct, for comparison
|
||||
};
|
||||
static Map<StringName, NativeStruct> native_structs;
|
||||
static HashMap<StringName, NativeStruct> native_structs;
|
||||
|
||||
private:
|
||||
// Non-locking variants of get_parent_class and is_parent_class.
|
||||
|
||||
Reference in New Issue
Block a user