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:
gfgtdf 2018-10-25 23:28:47 +02:00
parent 783dc0767b
commit cc5aac7009

View file

@ -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;
}
}