Replace robin_hood map and set with STD alternative and add safeVal() function for map/vector access with fallback

This commit is contained in:
aristocratos
2023-12-25 02:26:13 +01:00
parent a2325371d4
commit ced47a960f
19 changed files with 261 additions and 214 deletions

View File

@@ -49,7 +49,7 @@ namespace rng = std::ranges;
namespace Input {
//* Map for translating key codes to readable values
const unordered_flat_map<string, string> Key_escapes = {
const std::unordered_map<string, string> Key_escapes = {
{"\033", "escape"},
{"\n", "enter"},
{" ", "space"},
@@ -92,7 +92,7 @@ namespace Input {
std::atomic<bool> interrupt (false);
std::atomic<bool> polling (false);
array<int, 2> mouse_pos;
unordered_flat_map<string, Mouse_loc> mouse_mappings;
std::unordered_map<string, Mouse_loc> mouse_mappings;
deque<string> history(50, "");
string old_filter;