diff --git a/asonov.cpp b/asonov.cpp index df7500a4..420a80dd 100644 --- a/asonov.cpp +++ b/asonov.cpp @@ -136,8 +136,8 @@ EX transmatrix adjmatrix(int i) { } struct hrmap_asonov : hrmap { - unordered_map at; - unordered_map coords; + map at; + map coords; heptagon *getOrigin() override { return get_at(coord(0,0,0)); } diff --git a/basegraph.cpp b/basegraph.cpp index d5f1f6a5..2792332e 100644 --- a/basegraph.cpp +++ b/basegraph.cpp @@ -22,7 +22,7 @@ struct display_data { /** The view relative to the player character. */ shiftmatrix player_matrix; /** On-screen coordinates for all the visible cells. */ - unordered_map cellmatrices, old_cellmatrices; + map cellmatrices, old_cellmatrices; /** Position of the current map view, relative to the screen (0 to 1). */ ld xmin, ymin, xmax, ymax; /** Position of the current map view, in pixels. */ @@ -50,7 +50,7 @@ struct display_data { /** Which copy of the player cell? */ transmatrix which_copy; /** On-screen coordinates for all the visible cells. */ - unordered_map> all_drawn_copies; + map> all_drawn_copies; }; #define View (::hr::current_display->view_matrix) diff --git a/complex.cpp b/complex.cpp index 8fae488e..937f1abd 100644 --- a/complex.cpp +++ b/complex.cpp @@ -3356,7 +3356,7 @@ EX namespace ca { EX eWall wlive = waFloorA; - EX unordered_set changed; + EX set changed; EX void list_adj(cell *c) { changed.insert(c); diff --git a/config.cpp b/config.cpp index a4d8488a..38f3f877 100644 --- a/config.cpp +++ b/config.cpp @@ -2710,7 +2710,7 @@ EX int read_gamemode_args() { auto ah_config = addHook(hooks_args, 0, read_config_args) + addHook(hooks_args, 0, read_gamemode_args) + addHook(hooks_args, 0, read_color_args); #endif -EX unordered_map params = { +EX map params = { {"linewidth", vid.linewidth}, {"patternlinewidth", linepatterns::width}, {"scale", pconf.scale}, diff --git a/crystal.cpp b/crystal.cpp index a6ba6b23..e703a4d3 100644 --- a/crystal.cpp +++ b/crystal.cpp @@ -471,7 +471,7 @@ struct hrmap_crystal : hrmap_standard { map heptagon_at; map landmemo; map landmemo4; - unordered_map> distmemo; + map> distmemo; map sgc; cell *camelot_center; ldcoord camelot_coord; diff --git a/drawing.cpp b/drawing.cpp index ebbc4fb3..581478fa 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -2119,7 +2119,7 @@ EX void sort_drawqueue() { int siz = isize(ptds); #if MINIMIZE_GL_CALLS - unordered_map>> subqueue; + map>> subqueue; for(auto& p: ptds) subqueue[(p->prio == PPR::CIRCLE || p->prio == PPR::OUTCIRCLE) ? 0 : p->outline_group()].push_back(move(p)); ptds.clear(); for(auto& p: subqueue) for(auto& r: p.second) ptds.push_back(move(r)); diff --git a/euclid.cpp b/euclid.cpp index 69eba4fc..2fb30fd5 100644 --- a/euclid.cpp +++ b/euclid.cpp @@ -100,7 +100,7 @@ EX namespace euc { /** ? */ intmatrix inverse_axes; /** for canonicalization on tori */ - unordered_map hash; + map hash; vector seq; int index; diff --git a/hyper.h b/hyper.h index 830718c6..1df8fcca 100644 --- a/hyper.h +++ b/hyper.h @@ -48,7 +48,6 @@ template bool among(T x, V y, U... u) { return x== using std::vector; using std::map; using std::array; -using std::unordered_map; using std::sort; using std::multimap; using std::set; diff --git a/mapeditor.cpp b/mapeditor.cpp index ee813456..c8301e6b 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -1095,8 +1095,8 @@ EX namespace mapeditor { displayButton(8, vid.yres-8-fs*2, XLAT("ESC = return to the game"), SDLK_ESCAPE, 0); } - EX unordered_set affected; - EX unordered_set affected_id; + EX set affected; + EX set affected_id; EX void showMapEditor() { cmode = sm::MAP; diff --git a/nonisotropic.cpp b/nonisotropic.cpp index b6cd9121..4fbbb98d 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -236,8 +236,8 @@ EX namespace sn { struct hrmap_solnih : hrmap { hrmap *binary_map; hrmap *ternary_map; /* nih only */ - unordered_map, heptagon*> at; - unordered_map> coords; + map, heptagon*> at; + map> coords; heptagon *origin; @@ -872,8 +872,8 @@ EX namespace nilv { } struct hrmap_nil : hrmap { - unordered_map at; - unordered_map coords; + map at; + map coords; heptagon *getOrigin() override { return get_at(mvec_zero); } @@ -2065,7 +2065,7 @@ EX namespace rots { return spin(beta) * uxpush(distance/2) * spin(-beta+alpha); } - std::unordered_map saved_matrices_ray; + std::map saved_matrices_ray; EX transmatrix ray_iadj(cell *c1, int i) { if(i == c1->type-1) return uzpush(-cgi.plevel) * spin(-2*cgi.plevel); @@ -2097,7 +2097,7 @@ EX namespace rots { struct hrmap_rotation_space : hybrid::hrmap_hybrid { - std::unordered_map saved_matrices; + std::map saved_matrices; transmatrix adj(cell *c1, int i) override { if(i == c1->type-2) return uzpush(-cgi.plevel) * spin(-2*cgi.plevel); diff --git a/reg3.cpp b/reg3.cpp index ca87c30e..7ccdd64a 100644 --- a/reg3.cpp +++ b/reg3.cpp @@ -601,8 +601,8 @@ EX namespace reg3 { hrmap *binary_map; hrmap_quotient3 *quotient_map; - unordered_map> reg_gmatrix; - unordered_map > > altmap; + map> reg_gmatrix; + map > > altmap; vector spherecells; @@ -1439,7 +1439,7 @@ ld adistance(cell *c) { return regmap()->reg_gmatrix[c->master].first->distance * log(2) - h[0]; } -unordered_map, int> memo; +map, int> memo; bool cdd; diff --git a/rogueviz/janko.cpp b/rogueviz/janko.cpp index 5bcf64f0..79a8939a 100644 --- a/rogueviz/janko.cpp +++ b/rogueviz/janko.cpp @@ -29,7 +29,7 @@ struct jmatrix : array, 7> { }; vector jms; -std::unordered_map ids; +std::map ids; jmatrix J, Z, id; diff --git a/rogueviz/magmahep.cpp b/rogueviz/magmahep.cpp index 3258470f..6b45175d 100644 --- a/rogueviz/magmahep.cpp +++ b/rogueviz/magmahep.cpp @@ -74,7 +74,7 @@ void make() { for(int i=0; i, int> counts; + map, int> counts; int big = v - 2; diff --git a/rogueviz/newconf.cpp b/rogueviz/newconf.cpp index 1a3b1a36..e7d84b97 100644 --- a/rogueviz/newconf.cpp +++ b/rogueviz/newconf.cpp @@ -11,7 +11,7 @@ #endif #define main nconf_main -#undef unordered_map +#undef map #undef self #include "nconf.cpp" #undef main diff --git a/rogueviz/rogueviz.cpp b/rogueviz/rogueviz.cpp index e4be7ce9..4cfa6b6f 100644 --- a/rogueviz/rogueviz.cpp +++ b/rogueviz/rogueviz.cpp @@ -546,7 +546,7 @@ void queuedisk(const shiftmatrix& V, const colorpair& cp, bool legend, const str } } -unordered_map, int> drawn_edges; +map, int> drawn_edges; map, transmatrix> relmatrices; diff --git a/shmup.cpp b/shmup.cpp index 5b46894f..3db3c7f5 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -2527,7 +2527,7 @@ EX void turn(int delta) { if(doall) for(cell *c: currentmap->allcells()) activateMonstersAt(c); else - for(unordered_map::iterator it = gmatrix.begin(); it != gmatrix.end(); it++) + for(map::iterator it = gmatrix.begin(); it != gmatrix.end(); it++) activateMonstersAt(it->first); /* printf("size: gmatrix = %ld, active = %ld, monstersAt = %ld, delta = %d\n", diff --git a/sky.cpp b/sky.cpp index 8e4527b1..96905aaf 100644 --- a/sky.cpp +++ b/sky.cpp @@ -55,10 +55,7 @@ void dqi_sky::draw() { int sk = get_skybrightness(); - unordered_map> colors; - #ifdef USE_UNORDERED_MAP - colors.reserve(isize(sky)); - #endif + map> colors; for(sky_item& si: sky) colors[si.c] = make_pair(darkena(gradient(0, si.color, 0, sk, 255), 0, 0xFF), darkena(si.skycolor, 0, 0xFF) diff --git a/sysconfig.h b/sysconfig.h index 015b727f..eedff12a 100644 --- a/sysconfig.h +++ b/sysconfig.h @@ -491,14 +491,6 @@ typedef unsigned GLuint; #endif #endif -#ifdef USE_UNORDERED_MAP -#include -#include -#else -#define unordered_map map -#define unordered_set set -#endif - #include #if ISWINDOWS