mirror of https://github.com/Icinga/icinga2.git
Cleaned up includes; using namespace std is the default now.
This commit is contained in:
parent
191ded487b
commit
1b6bfb9db5
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
using std::map;
|
||||
using std::string;
|
||||
|
||||
class ConfigHive;
|
||||
|
||||
class ConfigObject : public Object
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
using std::list;
|
||||
|
||||
struct EventArgs : public Object
|
||||
{
|
||||
typedef shared_ptr<EventArgs> RefType;
|
||||
|
|
|
@ -14,14 +14,22 @@
|
|||
#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
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
using std::exception;
|
||||
|
||||
class OutOfMemoryException : public exception { };
|
||||
|
||||
class Memory
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <fstream>
|
||||
|
||||
using namespace icinga;
|
||||
using std::ifstream;
|
||||
|
||||
string ConfigFileComponent::GetName(void)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include "i2-configrpccomponent.h"
|
||||
|
||||
using namespace icinga;
|
||||
using std::tr1::dynamic_pointer_cast;
|
||||
|
||||
IcingaApplication::RefType ConfigRpcComponent::GetIcingaApplication(void)
|
||||
{
|
||||
|
|
|
@ -9,9 +9,6 @@
|
|||
|
||||
using namespace icinga;
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
IcingaApplication::IcingaApplication(void)
|
||||
{
|
||||
m_ConnectionManager = new_object<ConnectionManager>();
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
namespace icinga
|
||||
{
|
||||
|
||||
using std::map;
|
||||
|
||||
class ConnectionManager : public Object
|
||||
{
|
||||
list<JsonRpcServer::RefType> m_Servers;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue