From 746dddc0673d7261f19b1e056e90e6e3a49ef33a Mon Sep 17 00:00:00 2001 From: reduz 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/input/input_map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/input/input_map.cpp') diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 51c1cf9608..942c5248df 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -691,12 +691,12 @@ const HashMap>> &InputMap::get_builtins_with_featur return default_builtin_with_overrides_cache; } - HashMap>> builtins = get_builtins(); + const HashMap>> &builtins = get_builtins(); // Get a list of all built in inputs which are valid overrides for the OS // Key = builtin name (e.g. ui_accept) // Value = override/feature names (e.g. macos, if it was defined as "ui_accept.macos" and the platform supports that feature) - Map> builtins_with_overrides; + HashMap> builtins_with_overrides; for (const KeyValue>> &E : builtins) { String fullname = E.key; -- cgit v1.2.3