diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 22:50:06 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2012-08-26 23:06:30 +0200 |
commit | 770bcbd1844b97b671d0e47ea8313cdf2c74c5ea (patch) | |
tree | e030cf61afce9ca69b74bb38eb73734bf10f633e /crawl-ref/source/env.h | |
parent | a6c16c7f2066c854a01f25e9e6c3d8e44282a638 (diff) | |
download | crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.tar.gz crawl-ref-770bcbd1844b97b671d0e47ea8313cdf2c74c5ea.zip |
Use std namespace.
I had to rename distance() (in coord.h) to distance2() because it conflicts
with the STL function to compare 2 iterators. Not a bad change given how it
returns the square of the distance anyway.
I also had to rename the message global variable (in message.cc) to buffer.
I tried to fix and improve the coding style has much as I could, but I
probably missed a few given how huge and tedious it is.
I also didn't touch crawl-gdb.py, and the stuff in prebuilt, rltiles/tool
and util/levcomp.*, because I have no clue about those.
Diffstat (limited to 'crawl-ref/source/env.h')
-rw-r--r-- | crawl-ref/source/env.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crawl-ref/source/env.h b/crawl-ref/source/env.h index 44bc4e40ea..e3db207113 100644 --- a/crawl-ref/source/env.h +++ b/crawl-ref/source/env.h @@ -10,10 +10,10 @@ typedef FixedArray<short, GXM, GYM> grid_heightmap; typedef uint32_t terrain_property_t; -typedef std::set<std::string> string_set; +typedef set<string> string_set; struct vault_placement; -typedef std::vector<vault_placement*> vault_placement_refv; +typedef vector<vault_placement*> vault_placement_refv; struct crawl_environment { @@ -38,19 +38,19 @@ struct crawl_environment string_set level_uniq_map_tags; string_set level_layout_types; - std::string level_build_method; + string level_build_method; vault_placement_refv level_vaults; - std::auto_ptr<grid_heightmap> heightmap; + auto_ptr<grid_heightmap> heightmap; // Player-remembered terrain and LOS FixedArray< map_cell, GXM, GYM > map_knowledge; // Previous map knowledge (last step) FixedArray< map_cell, GXM, GYM > map_shadow; - std::set<coord_def> visible; + set<coord_def> visible; - std::vector<coord_def> travel_trail; + vector<coord_def> travel_trail; // indexed by grid coords #ifdef USE_TILE @@ -64,7 +64,7 @@ struct crawl_environment FixedArray<tileidx_t, ENV_SHOW_DIAMETER, ENV_SHOW_DIAMETER> tile_bg; #endif tile_flavour tile_default; - std::vector<std::string> tile_names; + vector<string> tile_names; FixedVector< cloud_struct, MAX_CLOUDS > cloud; // cloud list short cloud_no; @@ -107,16 +107,16 @@ struct crawl_environment int forest_awoken_until; int density; int absdepth0; - std::vector<std::pair<coord_def, int> > sunlight; + vector<pair<coord_def, int> > sunlight; // Volatile level flags, not saved. uint32_t level_state; // Mapping mid->mindex until the transition is finished. - std::map<mid_t, unsigned short> mid_cache; + map<mid_t, unsigned short> mid_cache; // Temp stuff. - std::vector<final_effect> final_effects; + vector<final_effect> final_effects; }; #ifdef DEBUG_GLOBALS |