File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212#include < string.h> // do not remove
1313#include < strings.h> // do not remove, strcasecmp
1414
15- using colors = std::map < std::string, color >;
15+ using colors = std::unordered_map < std::string, color >;
1616
1717colors color_map;
1818static bool color_init_done;
Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ class command_t
9999 command_fn_t callback;
100100};
101101
102- typedef std::shared_ptr< class command_t > commandp;
103- typedef std::map < std::string, commandp > commands;
104- static commands commands_map;
102+ typedef std::shared_ptr< class command_t > commandp;
103+ typedef std::unordered_map < std::string, commandp > commands;
104+ static commands commands_map;
105105
106106static uint8_t command_inited;
107107
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Fontp font_pixelart_large;
1111Fontp font_ascii;
1212Fontp font_ui;
1313
14- static std::map < std::string, Fontp > fonts;
14+ static std::unordered_map < std::string, Fontp > fonts;
1515
1616void font_fini (void ) { TRACE_AND_INDENT (); }
1717
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class music
2626 uint32_t rate = 44100 ;
2727};
2828
29- static std::map < std::string, class music * > all_music;
29+ static std::unordered_map < std::string, class music * > all_music;
3030
3131static std::string music_current;
3232
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ using ramdisk_t = struct ramdisk_t_ {
1212 int len;
1313};
1414
15- extern std::map < std::string, ramdisk_t_ > ramdisk_data;
15+ extern std::unordered_map < std::string, ramdisk_t_ > ramdisk_data;
1616
1717extern unsigned char *ramdisk_load (const char *filename, int *outlen);
1818extern void ramdisk_init (void );
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class sound
4343 float volume {};
4444};
4545
46- extern std::map < std::string, class sound * > all_sound;
46+ extern std::unordered_map < std::string, class sound * > all_sound;
4747
4848enum {
4949 CHANNEL_MISC,
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ void py_init(char *argv[])
138138
139139PyObject *py_add_module (const char *mod)
140140{
141- static std::map < std::string, PyObject * > py_mods;
141+ static std::unordered_map < std::string, PyObject * > py_mods;
142142
143143 auto name = std::string (mod);
144144 auto pmod = py_mods[ name ];
Original file line number Diff line number Diff line change 99#include " my_ramdisk.hpp"
1010#include " my_sys.hpp"
1111
12- std::map < std::string, ramdisk_t_ > ramdisk_data;
12+ std::unordered_map < std::string, ramdisk_t_ > ramdisk_data;
1313
1414unsigned char *ramdisk_load (const char *filename, int *outlen)
1515{
Original file line number Diff line number Diff line change 66#include " my_game.hpp"
77#include " my_sound.hpp"
88
9- std::map < std::string, class sound * > all_sound;
9+ std::unordered_map < std::string, class sound * > all_sound;
1010
1111bool sound_init_done;
1212
Original file line number Diff line number Diff line change @@ -47,9 +47,9 @@ class Tex
4747 SDL_Surface *surface = {};
4848};
4949
50- static std::map < std::string, Texp > textures;
51- static std::map < std::string, Texp > textures_monochrome;
52- static std::map < std::string, Texp > textures_mask;
50+ static std::unordered_map < std::string, Texp > textures;
51+ static std::unordered_map < std::string, Texp > textures_monochrome;
52+ static std::unordered_map < std::string, Texp > textures_mask;
5353
5454uint8_t tex_init (void )
5555{
You can’t perform that action at this time.
0 commit comments