Merge pull request #433 from shinra-electric/silence-warning-1

Silence warnings: Change a logical || to a bitwise |
This commit is contained in:
Tim Felgentreff 2023-02-27 14:48:25 +01:00 committed by GitHub
commit b2680af967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -237,7 +237,7 @@ void SelectFixed(const Vec2i &ltPos, const Vec2i &rbPos, std::vector<CUnit *> &u
Assert(Map.Info.IsPointOnMap(rbPos)); Assert(Map.Info.IsPointOnMap(rbPos));
Assert(units.empty()); Assert(units.empty());
units.reserve(selectMax << 1); units.reserve(selectMax << 1);
int max = selectMax || INT_MAX; int max = selectMax ? selectMax : INT_MAX;
for (Vec2i posIt = ltPos; posIt.y != rbPos.y + 1; ++posIt.y) { for (Vec2i posIt = ltPos; posIt.y != rbPos.y + 1; ++posIt.y) {
for (posIt.x = ltPos.x; posIt.x != rbPos.x + 1; ++posIt.x) { for (posIt.x = ltPos.x; posIt.x != rbPos.x + 1; ++posIt.x) {