Use prefix instead of postfix increment/decrement
Found by cppcheck.
This commit is contained in:
parent
413d3528bd
commit
c76de34fe6
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue