From 746dddc0673d7261f19b1e056e90e6e3a49ef33a Mon Sep 17 00:00:00 2001
From: reduz <reduzio@gmail.com>
Date: Fri, 13 May 2022 15:04:37 +0200
Subject: 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!
---
 core/debugger/script_debugger.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'core/debugger/script_debugger.h')

diff --git a/core/debugger/script_debugger.h b/core/debugger/script_debugger.h
index feb6702b54..a5a72d7c54 100644
--- a/core/debugger/script_debugger.h
+++ b/core/debugger/script_debugger.h
@@ -33,8 +33,8 @@
 
 #include "core/object/script_language.h"
 #include "core/string/string_name.h"
-#include "core/templates/map.h"
-#include "core/templates/set.h"
+#include "core/templates/rb_map.h"
+#include "core/templates/rb_set.h"
 #include "core/templates/vector.h"
 
 class ScriptDebugger {
@@ -44,7 +44,7 @@ class ScriptDebugger {
 	int depth = -1;
 	bool skip_breakpoints = false;
 
-	Map<int, Set<StringName>> breakpoints;
+	HashMap<int, RBSet<StringName>> breakpoints;
 
 	ScriptLanguage *break_lang = nullptr;
 	Vector<StackInfo> error_stack_info;
@@ -66,7 +66,7 @@ public:
 	bool is_breakpoint(int p_line, const StringName &p_source) const;
 	bool is_breakpoint_line(int p_line) const;
 	void clear_breakpoints();
-	const Map<int, Set<StringName>> &get_breakpoints() const { return breakpoints; }
+	const HashMap<int, RBSet<StringName>> &get_breakpoints() const { return breakpoints; }
 
 	void debug(ScriptLanguage *p_lang, bool p_can_continue = true, bool p_is_error_breakpoint = false);
 	ScriptLanguage *get_break_language() const;
-- 
cgit v1.2.3