Skip to content

Commit

Permalink
Use prefix instead of postfix increment/decrement
Browse files Browse the repository at this point in the history
Found by cppcheck.
  • Loading branch information
irydacea committed Jul 7, 2015
1 parent 413d352 commit c76de34
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/halo.cpp
Expand Up @@ -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();
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit c76de34

Please sign in to comment.