Module: check_mk
Branch: master
Commit: c479410761d86d0acada90f531d3c23eee1ce54a
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c479410761d86d…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Dec 11 11:23:29 2015 +0100
Finishing iwyu changes.
livestatus is now iwyu-clean, and every header includes config.h.
---
livestatus/src/DoublePointerColumn.h | 13 +++++++-----
livestatus/src/FixedIntColumn.h | 12 ++++++-----
livestatus/src/IntPointerColumn.h | 12 ++++++-----
livestatus/src/StatusSpecialIntColumn.cc | 4 +---
livestatus/src/StatusSpecialIntColumn.h | 12 ++++++-----
livestatus/src/StringPointerColumn.h | 12 ++++++-----
livestatus/src/data_encoding.h | 2 ++
livestatus/src/livestatus.h | 2 ++
livestatus/src/tables.h | 33 +++++++++++++++---------------
9 files changed, 58 insertions(+), 44 deletions(-)
diff --git a/livestatus/src/DoublePointerColumn.h b/livestatus/src/DoublePointerColumn.h
index e92fa70..59d7364 100644
--- a/livestatus/src/DoublePointerColumn.h
+++ b/livestatus/src/DoublePointerColumn.h
@@ -25,16 +25,19 @@
#ifndef DoublePointerColumn_h
#define DoublePointerColumn_h
+#include "config.h" // IWYU pragma: keep
#include "DoubleColumn.h"
-class DoublePointerColumn : public DoubleColumn
-{
+class DoublePointerColumn : public DoubleColumn {
double *_number;
+
public:
- DoublePointerColumn(std::string name, std::string description, double *number)
- : DoubleColumn(name, description, -1), _number(number) {}
+ DoublePointerColumn(std::string name, std::string description,
+ double *number)
+ : DoubleColumn(name, description, -1), _number(number)
+ {
+ }
double getValue(void *) { return *_number; }
};
-
#endif // DoublePointerColumn_h
diff --git a/livestatus/src/FixedIntColumn.h b/livestatus/src/FixedIntColumn.h
index 8ddc13c..8debbb3 100644
--- a/livestatus/src/FixedIntColumn.h
+++ b/livestatus/src/FixedIntColumn.h
@@ -22,18 +22,20 @@
// to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
// Boston, MA 02110-1301 USA.
-
#ifndef FixedIntColumn_h
#define FixedIntColumn_h
+#include "config.h" // IWYU pragma: keep
#include "IntColumn.h"
-class FixedIntColumn : public IntColumn
-{
+class FixedIntColumn : public IntColumn {
int32_t _value;
+
public:
- FixedIntColumn(std::string name, std::string description, int value) :
- IntColumn(name, description, -1), _value(value) {}
+ FixedIntColumn(std::string name, std::string description, int value)
+ : IntColumn(name, description, -1), _value(value)
+ {
+ }
int32_t getValue(void *, Query *) { return _value; }
};
diff --git a/livestatus/src/IntPointerColumn.h b/livestatus/src/IntPointerColumn.h
index 7242725..962f6aa 100644
--- a/livestatus/src/IntPointerColumn.h
+++ b/livestatus/src/IntPointerColumn.h
@@ -25,16 +25,18 @@
#ifndef IntPointerColumn_h
#define IntPointerColumn_h
+#include "config.h" // IWYU pragma: keep
#include "IntColumn.h"
-class IntPointerColumn : public IntColumn
-{
+class IntPointerColumn : public IntColumn {
int *_number;
+
public:
- IntPointerColumn(std::string name, std::string description, int* number)
- : IntColumn(name, description, -1), _number(number) {}
+ IntPointerColumn(std::string name, std::string description, int *number)
+ : IntColumn(name, description, -1), _number(number)
+ {
+ }
int32_t getValue(void *, Query *) { return *_number; }
};
-
#endif // IntPointerColumn_h
diff --git a/livestatus/src/StatusSpecialIntColumn.cc
b/livestatus/src/StatusSpecialIntColumn.cc
index e9fa5a6..ffa2b92 100644
--- a/livestatus/src/StatusSpecialIntColumn.cc
+++ b/livestatus/src/StatusSpecialIntColumn.cc
@@ -26,12 +26,10 @@
#include "mk_inventory.h"
class Query;
-
int32_t StatusSpecialIntColumn::getValue(void *, Query *)
{
switch (_type) {
- case SPIC_MK_INVENTORY_LAST:
- return mk_inventory_last_of_all();
+ case SPIC_MK_INVENTORY_LAST: return mk_inventory_last_of_all();
}
// never reached, make -Wall happy
return 0;
diff --git a/livestatus/src/StatusSpecialIntColumn.h
b/livestatus/src/StatusSpecialIntColumn.h
index 1964fba..5b39c18 100644
--- a/livestatus/src/StatusSpecialIntColumn.h
+++ b/livestatus/src/StatusSpecialIntColumn.h
@@ -25,20 +25,22 @@
#ifndef StatusSpecialIntColumn_h
#define StatusSpecialIntColumn_h
-#include "IntColumn.h"
+#include "config.h" // IWYU pragma: keep
#include <stdint.h>
#include <string>
+#include "IntColumn.h"
class Query;
-
#define SPIC_MK_INVENTORY_LAST 0
-class StatusSpecialIntColumn : public IntColumn
-{
+class StatusSpecialIntColumn : public IntColumn {
int _type;
+
public:
StatusSpecialIntColumn(std::string name, std::string description, int type)
- : IntColumn(name, description, -1), _type(type) {}
+ : IntColumn(name, description, -1), _type(type)
+ {
+ }
int32_t getValue(void *, Query *);
};
diff --git a/livestatus/src/StringPointerColumn.h b/livestatus/src/StringPointerColumn.h
index 6431c88..9c6df46 100644
--- a/livestatus/src/StringPointerColumn.h
+++ b/livestatus/src/StringPointerColumn.h
@@ -25,16 +25,18 @@
#ifndef StringPointerColumn_h
#define StringPointerColumn_h
+#include "config.h" // IWYU pragma: keep
#include "StringColumn.h"
-class StringPointerColumn : public StringColumn
-{
+class StringPointerColumn : public StringColumn {
char *_string;
+
public:
StringPointerColumn(std::string name, std::string description, char *string)
- : StringColumn(name, description, -1), _string(string) {}
- char* getValue(void* ) { return _string; }
+ : StringColumn(name, description, -1), _string(string)
+ {
+ }
+ char *getValue(void *) { return _string; }
};
-
#endif // StringPointerColumn_h
diff --git a/livestatus/src/data_encoding.h b/livestatus/src/data_encoding.h
index 351cd70..eaa6e15 100644
--- a/livestatus/src/data_encoding.h
+++ b/livestatus/src/data_encoding.h
@@ -25,6 +25,8 @@
#ifndef data_encoding_h
#define data_encoding_h
+#include "config.h" // IWYU pragma: keep
+
#define ENCODING_UTF8 0
#define ENCODING_LATIN1 1
#define ENCODING_MIXED 2
diff --git a/livestatus/src/livestatus.h b/livestatus/src/livestatus.h
index 83d7188..b1fd6d1 100644
--- a/livestatus/src/livestatus.h
+++ b/livestatus/src/livestatus.h
@@ -25,6 +25,8 @@
#ifndef livestatus_h
#define livestatus_h
+#include "config.h" // IWYU pragma: keep
+
#define DEFAULT_SOCKET_PATH "/usr/local/nagios/var/rw/live"
#endif // livestatus_h
diff --git a/livestatus/src/tables.h b/livestatus/src/tables.h
index 90d2e92..9bd05c2 100644
--- a/livestatus/src/tables.h
+++ b/livestatus/src/tables.h
@@ -25,40 +25,41 @@
#ifndef tables_h
#define tables_h
+#include "config.h" // IWYU pragma: keep
+
#ifndef EXTERN
#define EXTERN extern
#endif
class TableContacts;
-EXTERN TableContacts *g_table_contacts;
+EXTERN TableContacts *g_table_contacts;
class TableCommands;
-EXTERN TableCommands *g_table_commands;
+EXTERN TableCommands *g_table_commands;
class TableHosts;
-EXTERN TableHosts *g_table_hosts;
-EXTERN TableHosts *g_table_hostsbygroup;
+EXTERN TableHosts *g_table_hosts;
+EXTERN TableHosts *g_table_hostsbygroup;
class TableServices;
-EXTERN TableServices *g_table_services;
-EXTERN TableServices *g_table_servicesbygroup;
-EXTERN TableServices *g_table_servicesbyhostgroup;
+EXTERN TableServices *g_table_services;
+EXTERN TableServices *g_table_servicesbygroup;
+EXTERN TableServices *g_table_servicesbyhostgroup;
class TableHostgroups;
-EXTERN TableHostgroups *g_table_hostgroups;
+EXTERN TableHostgroups *g_table_hostgroups;
class TableServicegroups;
EXTERN TableServicegroups *g_table_servicegroups;
class TableDownComm;
-EXTERN TableDownComm *g_table_downtimes;
-EXTERN TableDownComm *g_table_comments;
+EXTERN TableDownComm *g_table_downtimes;
+EXTERN TableDownComm *g_table_comments;
class TableTimeperiods;
-EXTERN TableTimeperiods *g_table_timeperiods;
+EXTERN TableTimeperiods *g_table_timeperiods;
class TableContactgroups;
EXTERN TableContactgroups *g_table_contactgroups;
class TableStatus;
-EXTERN TableStatus *g_table_status;
+EXTERN TableStatus *g_table_status;
class TableLog;
-EXTERN TableLog *g_table_log;
+EXTERN TableLog *g_table_log;
class TableStateHistory;
-EXTERN TableStateHistory *g_table_statehistory;
+EXTERN TableStateHistory *g_table_statehistory;
class TableColumns;
-EXTERN TableColumns *g_table_columns;
+EXTERN TableColumns *g_table_columns;
#endif // tables_h
-