mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-19 00:17:56 +02:00
Simplify statements
-Simplify return statements across the code
This commit is contained in:
committed by
Alexander Shishkin
parent
ec536e613c
commit
ac6b477aa2
@ -65,9 +65,7 @@ bool CTownInstanceConstructor::objectFilter(const CGObjectInstance * object, con
|
||||
return town->hasBuilt(id);
|
||||
};
|
||||
|
||||
if (filters.count(templ.stringID))
|
||||
return filters.at(templ.stringID).test(buildTest);
|
||||
return false;
|
||||
return filters.count(templ.stringID) != 0 && filters.at(templ.stringID).test(buildTest);
|
||||
}
|
||||
|
||||
CGObjectInstance * CTownInstanceConstructor::create(const ObjectTemplate & tmpl) const
|
||||
|
Reference in New Issue
Block a user