Skip to content

Commit

Permalink
Use ternary operator instead of |
Browse files Browse the repository at this point in the history
as suggested

Co-authored-by: Tim Felgentreff <[email protected]>
  • Loading branch information
shinra-electric and timfel authored Feb 26, 2023
1 parent c4d3233 commit c814f57
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 c814f57

Please sign in to comment.