Use prefix instead of postfix increment/decrement

Found by cppcheck.
This commit is contained in:
Ignacio R. Morelle 2015-07-06 22:21:33 -03:00
parent 413d3528bd
commit c76de34fe6

View file

@ -356,10 +356,10 @@ void halo_impl::remove(int handle)
void halo_impl::unrender(std::set<map_location> invalidated_locations)
{
if(preferences::show_haloes() == false || haloes.size() == 0) {
if(preferences::show_haloes() == false || haloes.empty()) {
return;
}
//assert(invalidated_haloes.size() == 0);
//assert(invalidated_haloes.empty());
// Remove expired haloes
std::map<int, effect>::iterator itor = haloes.begin();
@ -433,8 +433,8 @@ void halo_impl::unrender(std::set<map_location> invalidated_locations)
void halo_impl::render()
{
if(preferences::show_haloes() == false || haloes.size() == 0 ||
(new_haloes.size() == 0 && invalidated_haloes.size() == 0)) {
if(preferences::show_haloes() == false || haloes.empty() ||
(new_haloes.empty() && invalidated_haloes.empty())) {
return;
}