Skip to content

Commit

Permalink
Remove ternary operator.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Oct 11, 2024
1 parent c8be78f commit 98950ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,11 @@ void Game::moveBullets()
hitTank(tankIter, bulletIter->getPower());
valid = false;
}
bulletIter = (valid ? ++bulletIter : bullets_.erase(bulletIter));

if (valid)
++bulletIter;
else
bulletIter = bullets_.erase(bulletIter);
}
}

Expand Down

0 comments on commit 98950ca

Please sign in to comment.