From 74eae8dc3dc3debe5ad7e912489eb53d3adbf94e Mon Sep 17 00:00:00 2001 From: Patrick Parker Date: Sun, 22 Jun 2008 17:32:53 +0000 Subject: [PATCH] by convention, avoid using literal zero in a non-numeric context --- src/terrain_filter.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/terrain_filter.hpp b/src/terrain_filter.hpp index f8a5320845e..b8103e9d595 100644 --- a/src/terrain_filter.hpp +++ b/src/terrain_filter.hpp @@ -27,7 +27,7 @@ class unit_map; //terrain_filter: a class that implements the Standard Location Filter class terrain_filter : public xy_pred { public: - terrain_filter(const vconfig& cfg, const gamemap& map, const gamestatus& game_status, + terrain_filter(const vconfig& cfg, const gamemap& map, const gamestatus& game_status, const unit_map& units, const bool flat_tod=false, const size_t max_loop=MAX_MAP_AREA); terrain_filter(const vconfig& cfg, const terrain_filter& original); ~terrain_filter() {}; @@ -60,23 +60,23 @@ private: const unit_map& units_; struct terrain_filter_cache { - terrain_filter_cache() : - parsed_terrain(0), - adjacent_matches(0), + terrain_filter_cache() : + parsed_terrain(NULL), + adjacent_matches(NULL), adjacent_match_cache() { } - ~terrain_filter_cache() { + ~terrain_filter_cache() { delete parsed_terrain; delete adjacent_matches; - } + } //parsed_terrain: optimizes handling of terrain="..." - t_translation::t_match *parsed_terrain; + t_translation::t_match *parsed_terrain; //adjacent_matches: optimize handling of [filter_adjacent_location] for get_locations() - std::vector< std::set > *adjacent_matches; + std::vector< std::set > *adjacent_matches; //adjacent_match_cache: optimize handling of [filter_adjacent_location] for match() std::vector< std::pair > > adjacent_match_cache;