Author: sapient
Date: Sun Jun 22 19:32:53 2008
New Revision: 27411
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27411&view=rev
Log:
by convention, avoid using literal zero in a non-numeric context
Modified:
trunk/src/terrain_filter.hpp
Modified: trunk/src/terrain_filter.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/terrain_filter.hpp?rev=27411&r1=27410&r2=27411&view=diff
==============================================================================
--- trunk/src/terrain_filter.hpp (original)
+++ trunk/src/terrain_filter.hpp Sun Jun 22 19:32:53 2008
@@ -27,7 +27,7 @@
//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 @@
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<gamemap::location> > *adjacent_matches;
+ std::vector< std::set<gamemap::location> > *adjacent_matches;
//adjacent_match_cache: optimize handling of
[filter_adjacent_location] for match()
std::vector< std::pair<terrain_filter,
std::map<gamemap::location,bool> > > adjacent_match_cache;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits