]> granicus.if.org Git - icinga2/commitdiff
Cleaned up includes; using namespace std is the default now.
authorGunnar Beutner <gunnar.beutner@netways.de>
Mon, 2 Apr 2012 07:03:29 +0000 (09:03 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Mon, 2 Apr 2012 07:03:29 +0000 (09:03 +0200)
16 files changed:
base/application.h
base/confighive.h
base/configobject.h
base/delegate.h
base/event.h
base/i2-base.h
base/memory.h
base/object.h
base/socket.cpp
base/tcpsocket.cpp
base/timer.cpp
configfilecomponent/configfilecomponent.cpp
configrpccomponent/configrpccomponent.cpp
icinga/icingaapplication.cpp
jsonrpc/connectionmanager.h
jsonrpc/netstring.cpp

index 1e0a98906ce2dfa4ea4463c7878f910a6e806c02..59dfda905865673ac4cdcf7dc82ea8139fbb5365 100644 (file)
@@ -1,14 +1,8 @@
 #ifndef APPLICATION_H
 #define APPLICATION_H
 
-#include <map>
-
 namespace icinga {
 
-using std::vector;
-using std::map;
-using std::string;
-
 class Component;
 
 class Application : public Object {
index 8425bf31fa1f1d90c16757b5c22158d614adacf9..fd5363cea1a4472d83ec97e71b822af94fbb5f64 100644 (file)
@@ -1,13 +1,9 @@
 #ifndef CONFIGHIVE_H
 #define CONFIGHIVE_H
 
-#include <map>
-
 namespace icinga
 {
 
-using std::map;
-
 struct ConfigHiveEventArgs : public EventArgs
 {
        typedef shared_ptr<ConfigHiveEventArgs> RefType;
index 150cafb34d3295008774871ee4c969d0b0b69bef..53bfd7b8aa1b79fa45926a50182f8809d3824245 100644 (file)
@@ -6,9 +6,6 @@
 namespace icinga
 {
 
-using std::map;
-using std::string;
-
 class ConfigHive;
 
 class ConfigObject : public Object
index 8a6f455ce46efb3557421d730cfbc8c1f8d3e2c0..de8f3cd43981c95157bd0148e160f7061ab6c3a1 100644 (file)
@@ -6,9 +6,6 @@
 namespace icinga
 {
 
-using std::tr1::function;
-using namespace std::tr1::placeholders;
-
 template<class TObject, class TArgs>
 int delegate_fwd(int (TObject::*function)(TArgs), weak_ptr<TObject> wref, const TArgs& args)
 {
index f4dba3343562cf38141b70f31c70b5a8e6b2a395..dcb5425d5e361075758b9cdd1f8dc0b6546c3c1a 100644 (file)
@@ -4,8 +4,6 @@
 namespace icinga
 {
 
-using std::list;
-
 struct EventArgs : public Object
 {
        typedef shared_ptr<EventArgs> RefType;
index 87757018a7dd9d5a881a188b34c5e4d383e5df43..9ecd733d3ba41062d319e3bc19d59c5f0b8e3606 100644 (file)
 #include <iostream>
 #include <list>
 #include <typeinfo>
-
+#include <map>
 #include <list>
+
+using namespace std;
+
 #ifdef _MSC_VER
 #      include <memory>
 #      include <functional>
+
+using namespace std::placeholders;
 #else
 #      include <tr1/memory>
 #      include <tr1/functional>
+
+using namespace std::tr1;
+using namespace std::tr1::placeholders;
 #endif
 
 #define PLATFORM_WINDOWS 1
index e23530cc019b0a44298fcdb0450934be17f98f3b..1126c8089eba62b0ad405d24fe39d9d8d5d5d468 100644 (file)
@@ -4,8 +4,6 @@
 namespace icinga
 {
 
-using std::exception;
-
 class OutOfMemoryException : public exception { };
 
 class Memory
index f62e60815f78656c90a01f9646fef6873515620b..ec60fcb22c57cd386426d8a4a2448c9639ff5286 100644 (file)
@@ -4,12 +4,6 @@
 namespace icinga
 {
 
-using std::tr1::shared_ptr;
-using std::tr1::weak_ptr;
-using std::tr1::enable_shared_from_this;
-using std::tr1::static_pointer_cast;
-using std::tr1::function;
-
 class Object : public enable_shared_from_this<Object>
 {
 private:
index 210ab9840c979ef2ceef4385069fdf9e3c529f0c..ccee82c5cedff1892dfcdf08e494e747326b0240 100644 (file)
@@ -1,10 +1,6 @@
-#include <functional>
-#include <algorithm>
 #include "i2-base.h"
 
 using namespace icinga;
-using std::bind2nd;
-using std::equal_to;
 
 list<Socket::WeakRefType> Socket::Sockets;
 
index 09a85a03b8a383b4a7d48b38cda808070113e4be..632fdf4179465896cf70bb4a3f1cc220f67d1149 100644 (file)
@@ -27,5 +27,5 @@ void TCPSocket::Bind(const char *hostname, unsigned short port)
        sin.sin_family = AF_INET;
        sin.sin_addr.s_addr = hostname ? inet_addr(hostname) : htonl(INADDR_ANY);
        sin.sin_port = htons(port);
-       bind(GetFD(), (sockaddr *)&sin, sizeof(sin));
+       ::bind(GetFD(), (sockaddr *)&sin, sizeof(sin));
 }
index 1bdb96521f091bccff70755fb669d17487fc02bc..26a7f8ce2a82dc59bc68f08ad07148deb303198a 100644 (file)
@@ -3,9 +3,6 @@
 #include "i2-base.h"
 
 using namespace icinga;
-using std::list;
-using std::bind2nd;
-using std::equal_to;
 
 time_t Timer::NextCall;
 list<Timer::WeakRefType> Timer::Timers;
index b50eda4d924ffeef76a33b4ce457b63403f4faa1..c2eed5e7c9ffd76535e23978c02558eaa7a8c78b 100644 (file)
@@ -4,7 +4,6 @@
 #include <fstream>
 
 using namespace icinga;
-using std::ifstream;
 
 string ConfigFileComponent::GetName(void)
 {
index 266eda1a4a1c9f2b32360451e5513ff86dc3ef0c..1dc68cca8965abea0e34ffae406ba1fe9f1fcd4d 100644 (file)
@@ -1,7 +1,6 @@
 #include "i2-configrpccomponent.h"
 
 using namespace icinga;
-using std::tr1::dynamic_pointer_cast;
 
 IcingaApplication::RefType ConfigRpcComponent::GetIcingaApplication(void)
 {
index 948953382ee1f817024b80093056fe18afec7505..b7144ca10ed8e850cf02e53ebca1bdb32e9c2754 100644 (file)
@@ -9,9 +9,6 @@
 
 using namespace icinga;
 
-using std::cout;
-using std::endl;
-
 IcingaApplication::IcingaApplication(void)
 {
        m_ConnectionManager = new_object<ConnectionManager>();
index 934244492c3c1c27cf203a9247b95145ccb71fbd..bbc075c91274ac53c432ad4a4b82c261c484bfe4 100644 (file)
@@ -4,8 +4,6 @@
 namespace icinga
 {
 
-using std::map;
-
 class ConnectionManager : public Object
 {
        list<JsonRpcServer::RefType> m_Servers;
index 05e6227cee50f6002c05cdb9ace3390917876eaf..ec7d8f787e84c3acbfe3dc100c3310e9227183e8 100644 (file)
@@ -2,7 +2,6 @@
 #include "i2-jsonrpc.h"
 
 using namespace icinga;
-using std::sprintf;
 
 /* based on https://github.com/PeterScott/netstring-c/blob/master/netstring.c */
 cJSON *Netstring::ReadJSONFromFIFO(FIFO::RefType fifo)