Skip to content

Commit

Permalink
remove max_loop parameter form terrain filters
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Aug 19, 2017
1 parent b2e9cd3 commit d597504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/terrain/filter.cpp
Expand Up @@ -43,12 +43,11 @@ terrain_filter::~terrain_filter()
{
}

terrain_filter::terrain_filter(const vconfig& cfg, const filter_context * fc,
const bool flat_tod, const size_t max_loop) :
terrain_filter::terrain_filter(const vconfig& cfg, const filter_context * fc, const bool flat_tod) :
cfg_(cfg),
fc_(fc),
cache_(),
max_loop_(max_loop),
max_loop_(game_config::max_loop),
flat_(flat_tod)
{
}
Expand Down
10 changes: 2 additions & 8 deletions src/terrain/filter.hpp
Expand Up @@ -30,8 +30,7 @@ class team;
class terrain_filter : public xy_pred {
public:

terrain_filter(const vconfig& cfg,
const filter_context * fc, const bool flat_tod=false, const size_t max_loop=game_config::max_loop);
terrain_filter(const vconfig& cfg, const filter_context * fc, const bool flat_tod=false);
terrain_filter(const vconfig& cfg, const terrain_filter& original);
/** Default implementation, but defined out-of-line for efficiency reasons. */
~terrain_filter();
Expand Down Expand Up @@ -69,11 +68,6 @@ class terrain_filter : public xy_pred {
return get_locs_impl(locs, &ref_unit, with_border);
}

//restrict: limits the allowed radius size and also limits nesting
// The purpose to limit the time spent for WML handling
// Note: this feature is not fully implemented, e.g. SLF inside SUF inside SLF
void restrict_size(const size_t max_loop) { max_loop_ = max_loop; }

//flatten: use base time of day -- ignore illumination ability
void flatten(const bool flat_tod=true) { flat_ = flat_tod; }

Expand Down Expand Up @@ -105,6 +99,6 @@ class terrain_filter : public xy_pred {
};

mutable terrain_filter_cache cache_;
size_t max_loop_;
const size_t max_loop_;
bool flat_;
};

0 comments on commit d597504

Please sign in to comment.