You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #112129 from DeeJayLSP/asetget
`ClassDB`: Use `AHashMap` for `property_setget` and `constant/signal_map`
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
// Makes callable_mp readily available in all classes connecting signals.
|
// Makes callable_mp readily available in all classes connecting signals.
|
||||||
// Needs to come after method_bind and object have been included.
|
// Needs to come after method_bind and object have been included.
|
||||||
#include "core/object/callable_method_pointer.h"
|
#include "core/object/callable_method_pointer.h"
|
||||||
|
#include "core/templates/a_hash_map.h"
|
||||||
#include "core/templates/hash_set.h"
|
#include "core/templates/hash_set.h"
|
||||||
|
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
@@ -127,14 +128,14 @@ public:
|
|||||||
|
|
||||||
HashMap<StringName, MethodBind *> method_map;
|
HashMap<StringName, MethodBind *> method_map;
|
||||||
HashMap<StringName, LocalVector<MethodBind *>> method_map_compatibility;
|
HashMap<StringName, LocalVector<MethodBind *>> method_map_compatibility;
|
||||||
HashMap<StringName, int64_t> constant_map;
|
AHashMap<StringName, int64_t> constant_map;
|
||||||
struct EnumInfo {
|
struct EnumInfo {
|
||||||
List<StringName> constants;
|
List<StringName> constants;
|
||||||
bool is_bitfield = false;
|
bool is_bitfield = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
HashMap<StringName, EnumInfo> enum_map;
|
HashMap<StringName, EnumInfo> enum_map;
|
||||||
HashMap<StringName, MethodInfo> signal_map;
|
AHashMap<StringName, MethodInfo> signal_map;
|
||||||
List<PropertyInfo> property_list;
|
List<PropertyInfo> property_list;
|
||||||
HashMap<StringName, PropertyInfo> property_map;
|
HashMap<StringName, PropertyInfo> property_map;
|
||||||
|
|
||||||
@@ -152,7 +153,7 @@ public:
|
|||||||
List<StringName> dependency_list;
|
List<StringName> dependency_list;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
HashMap<StringName, PropertySetGet> property_setget;
|
AHashMap<StringName, PropertySetGet> property_setget;
|
||||||
HashMap<StringName, Vector<uint32_t>> virtual_methods_compat;
|
HashMap<StringName, Vector<uint32_t>> virtual_methods_compat;
|
||||||
|
|
||||||
StringName inherits;
|
StringName inherits;
|
||||||
|
|||||||
@@ -4250,7 +4250,7 @@ bool BindingsGenerator::_populate_object_type_interfaces() {
|
|||||||
|
|
||||||
// Populate signals
|
// Populate signals
|
||||||
|
|
||||||
const HashMap<StringName, MethodInfo> &signal_map = class_info->signal_map;
|
const AHashMap<StringName, MethodInfo> &signal_map = class_info->signal_map;
|
||||||
|
|
||||||
for (const KeyValue<StringName, MethodInfo> &E : signal_map) {
|
for (const KeyValue<StringName, MethodInfo> &E : signal_map) {
|
||||||
SignalInterface isignal;
|
SignalInterface isignal;
|
||||||
|
|||||||
@@ -714,7 +714,7 @@ void add_exposed_classes(Context &r_context) {
|
|||||||
|
|
||||||
// Add signals
|
// Add signals
|
||||||
|
|
||||||
const HashMap<StringName, MethodInfo> &signal_map = class_info->signal_map;
|
const AHashMap<StringName, MethodInfo> &signal_map = class_info->signal_map;
|
||||||
|
|
||||||
for (const KeyValue<StringName, MethodInfo> &K : signal_map) {
|
for (const KeyValue<StringName, MethodInfo> &K : signal_map) {
|
||||||
SignalData signal;
|
SignalData signal;
|
||||||
|
|||||||
Reference in New Issue
Block a user