From d597504f1d5b2f53896ddc9ae3e7160c74b0b89f Mon Sep 17 00:00:00 2001 From: gfgtdf Date: Sat, 19 Aug 2017 16:53:52 +0200 Subject: [PATCH] remove max_loop parameter form terrain filters --- src/terrain/filter.cpp | 5 ++--- src/terrain/filter.hpp | 10 ++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/terrain/filter.cpp b/src/terrain/filter.cpp index 46397a953562..988f492d3487 100644 --- a/src/terrain/filter.cpp +++ b/src/terrain/filter.cpp @@ -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) { } diff --git a/src/terrain/filter.hpp b/src/terrain/filter.hpp index 68814ff90f83..5371a8ef9112 100644 --- a/src/terrain/filter.hpp +++ b/src/terrain/filter.hpp @@ -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(); @@ -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; } @@ -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_; };