change a silent error check into an assertion
This commit is contained in:
parent
8f54188a39
commit
fbf763568f
1 changed files with 2 additions and 1 deletions
|
@ -162,7 +162,8 @@ bool terrain_filter::match_internal(const gamemap::location& loc, const bool ign
|
|||
} else if(lookup->second) {
|
||||
++match_count;
|
||||
}
|
||||
} else if(index < std::distance(cache_.adjacent_matches->begin(), cache_.adjacent_matches->end())) {
|
||||
} else {
|
||||
assert(index < std::distance(cache_.adjacent_matches->begin(), cache_.adjacent_matches->end()));
|
||||
std::set<gamemap::location> &amc = (*cache_.adjacent_matches)[index];
|
||||
if(amc.find(adj) != amc.end()) {
|
||||
++match_count;
|
||||
|
|
Loading…
Add table
Reference in a new issue