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:
@ -122,7 +122,7 @@ DOCTEST_STRINGIFY_VARIANT(PackedColorArray);
|
||||
// Example usage: `godot --test gdscript-parser`.
|
||||
|
||||
typedef void (*TestFunc)();
|
||||
extern Map<String, TestFunc> *test_commands;
|
||||
extern HashMap<String, TestFunc> *test_commands;
|
||||
int register_test_command(String p_command, TestFunc p_function);
|
||||
|
||||
#define REGISTER_TEST_COMMAND(m_command, m_function) \
|
||||
@ -233,8 +233,8 @@ class SignalWatcher : public Object {
|
||||
private:
|
||||
inline static SignalWatcher *singleton;
|
||||
|
||||
/* Equal to: Map<String, Vector<Vector<Variant>>> */
|
||||
Map<String, Array> _signals;
|
||||
/* Equal to: RBMap<String, Vector<Vector<Variant>>> */
|
||||
HashMap<String, Array> _signals;
|
||||
void _add_signal_entry(const Array &p_args, const String &p_name) {
|
||||
if (!_signals.has(p_name)) {
|
||||
_signals[p_name] = Array();
|
||||
|
||||
Reference in New Issue
Block a user