Module: check_mk
Branch: master
Commit: 1ffbc6d7c48bb1598068b510126100dc52c5c7d2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1ffbc6d7c48bb1…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Tue Nov 10 09:05:06 2015 +0100
cppcheck-induced cleanup: Prefer prefix increment/decrement (doesn't involve
temporaries).
---
livestatus/src/TableStateHistory.cc | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index ac45c4e..a91b714 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -200,7 +200,7 @@ LogEntry *TableStateHistory::getPreviousLogentry()
if (_it_logs == g_store->logCache()->logfiles()->begin())
return 0;
else {
- _it_logs--;
+ --_it_logs;
_entries = _it_logs->second->getEntriesFromQuery(_query,
g_store->logCache(), _since, _until, CLASSMASK_STATEHIST);
_it_entries = _entries->end();
}
@@ -354,7 +354,7 @@ void TableStateHistory::answerQuery(Query *query)
while (it_hst != state_info.end()) {
it_hst->second->_from = _since;
it_hst->second->_until = _since;
- it_hst++;
+ ++it_hst;
}
only_update = false;
}
@@ -368,7 +368,7 @@ void TableStateHistory::answerQuery(Query *query)
if (hst->_may_no_longer_exist) {
hst->_has_vanished = true;
}
- it_hst++;
+ ++it_hst;
}
in_nagios_initial_states = false;
}
@@ -459,7 +459,7 @@ void TableStateHistory::answerQuery(Query *query)
if (it_inh->second->_host == state->_host){
state->_services.push_back(it_inh->second);
}
- it_inh++;
+ ++it_inh;
}
} else {
state_info_t::iterator it_inh = state_info.find(state->_host);
@@ -554,7 +554,7 @@ void TableStateHistory::answerQuery(Query *query)
HostServices::iterator it_svc = state->_services.begin();
while (it_svc != state->_services.end()) {
updateHostServiceState(query, entry, *it_svc, only_update);
- it_svc++;
+ ++it_svc;
}
}
}
@@ -580,7 +580,7 @@ void TableStateHistory::answerQuery(Query *query)
state_info_t::iterator it_hst = state_info.begin();
while (it_hst != state_info.end()) {
updateHostServiceState(query, entry, it_hst->second, only_update);
- it_hst++;
+ ++it_hst;
}
free(buffer);
break;
@@ -597,7 +597,7 @@ void TableStateHistory::answerQuery(Query *query)
it_hst->second->_last_known_time = entry->_time;
it_hst->second->_may_no_longer_exist = true;
}
- it_hst++;
+ ++it_hst;
}
in_nagios_initial_states = true;
break;
@@ -632,7 +632,7 @@ void TableStateHistory::answerQuery(Query *query)
hst->_until = hst->_time;
process(query, hst);
- it_hst++;
+ ++it_hst;
}
}
@@ -640,7 +640,7 @@ void TableStateHistory::answerQuery(Query *query)
it_hst = state_info.begin();
while (it_hst != state_info.end()) {
delete it_hst->second;
- it_hst++;
+ ++it_hst;
}
state_info.clear();
object_blacklist.clear();