replace impossible check with assert.
since we refactored gamestate construction to initialize units last, it is no longer possible that resources::filter_con is a nullptr here.
This commit is contained in:
parent
783dc0767b
commit
cc5aac7009
1 changed files with 2 additions and 2 deletions
|
@ -2169,8 +2169,8 @@ void unit::add_modification(const std::string& mod_type, const config& mod, bool
|
|||
for(const config& effect : mod.child_range("effect")) {
|
||||
// Apply SUF.
|
||||
if(const config& afilter = effect.child("filter")) {
|
||||
// @FIXME: during gamestate construction resources::filter_con is not available
|
||||
if(resources::filter_con && !unit_filter(vconfig(afilter)).matches(*this, loc_)) {
|
||||
assert(resources::filter_con);
|
||||
if(!unit_filter(vconfig(afilter)).matches(*this, loc_)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue