1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Simplify statements

-Simplify return statements across the code
This commit is contained in:
Michał Kalinowski
2019-03-20 20:58:15 +01:00
committed by Alexander Shishkin
parent ec536e613c
commit ac6b477aa2
21 changed files with 45 additions and 148 deletions

View File

@ -617,10 +617,7 @@ void CMapGenerator::createConnections2()
boost::set_intersection(tilesA, tilesB, std::back_inserter(commonTiles), [](const int3 &lhs, const int3 &rhs) -> bool
{
//ignore z coordinate
if (lhs.x < rhs.x)
return true;
else
return lhs.y < rhs.y;
return lhs.x < rhs.x || lhs.y < rhs.y;
});
vstd::erase_if(commonTiles, [](const int3 &tile) -> bool