Skip to content

Commit

Permalink
Merge pull request #433 from shinra-electric/silence-warning-1
Browse files Browse the repository at this point in the history
Silence warnings: Change a logical || to a bitwise |
  • Loading branch information
timfel authored Feb 27, 2023
2 parents 52b6bea + c814f57 commit b2680af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/include/unit_find.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void SelectFixed(const Vec2i &ltPos, const Vec2i &rbPos, std::vector<CUnit *> &u
Assert(Map.Info.IsPointOnMap(rbPos));
Assert(units.empty());
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 (posIt.x = ltPos.x; posIt.x != rbPos.x + 1; ++posIt.x) {
Expand Down

0 comments on commit b2680af

Please sign in to comment.