Module: check_mk
Branch: master
Commit: fae992b3c4b44da0beb0e1281b3a9efc40ef7036
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=fae992b3c4b44d…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Wed Nov 2 16:25:23 2016 +0100
Fetched Livestatus from downstream.
---
livestatus/src/ClientQueue.h | 3 +--
livestatus/src/Query.h | 6 +++---
livestatus/src/TableStateHistory.cc | 4 ++--
livestatus/src/TableStateHistory.h | 3 +--
4 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/livestatus/src/ClientQueue.h b/livestatus/src/ClientQueue.h
index 3d1e92b..60309c8 100644
--- a/livestatus/src/ClientQueue.h
+++ b/livestatus/src/ClientQueue.h
@@ -40,8 +40,7 @@ public:
void terminate();
private:
- typedef std::deque<int> _queue_t;
- _queue_t _queue;
+ std::deque<int> _queue;
std::mutex _mutex;
std::condition_variable _cond;
bool _should_terminate;
diff --git a/livestatus/src/Query.h b/livestatus/src/Query.h
index cb8f605..e6327b3 100644
--- a/livestatus/src/Query.h
+++ b/livestatus/src/Query.h
@@ -93,9 +93,9 @@ private:
Logger *const _logger;
// normal queries
- typedef std::vector<Column *> _columns_t;
- _columns_t _columns;
- _columns_t _dummy_columns; // dynamically allocated. Must delete them.
+ std::vector<Column *> _columns;
+ // dynamically allocated. Must delete them.
+ std::vector<Column *> _dummy_columns;
// stats queries
std::vector<StatsColumn *> _stats_columns; // must also delete
diff --git a/livestatus/src/TableStateHistory.cc b/livestatus/src/TableStateHistory.cc
index 77c2ee9..2d3d39a 100644
--- a/livestatus/src/TableStateHistory.cc
+++ b/livestatus/src/TableStateHistory.cc
@@ -619,7 +619,7 @@ void TableStateHistory::answerQuery(Query *query) {
// Determine initial in_notification_period status
}
- _notification_periods_t::const_iterator tmp_period =
+ auto tmp_period =
_notification_periods.find(state->_notification_period);
if (tmp_period != _notification_periods.end()) {
state->_in_notification_period = tmp_period->second;
@@ -791,7 +791,7 @@ int TableStateHistory::updateHostServiceState(Query *query,
// Apply latest notification period information and set the host_state
// to unmonitored
- _notification_periods_t::const_iterator it_status =
+ auto it_status =
_notification_periods.find(hs_state->_notification_period);
if (it_status != _notification_periods.end()) {
hs_state->_in_notification_period = it_status->second;
diff --git a/livestatus/src/TableStateHistory.h b/livestatus/src/TableStateHistory.h
index 8168c17..ebddd98 100644
--- a/livestatus/src/TableStateHistory.h
+++ b/livestatus/src/TableStateHistory.h
@@ -59,8 +59,7 @@ class TableStateHistory : public Table {
int _until;
// Notification periods information, name: active(1)/inactive(0)
- typedef std::map<std::string, int> _notification_periods_t;
- _notification_periods_t _notification_periods;
+ std::map<std::string, int> _notification_periods;
// Helper functions to traverse through logfiles
_logfiles_t::iterator _it_logs;