diff options
author | Freeyorp <Freeyorp101@hotmail.com> | 2010-08-13 13:02:45 +1200 |
---|---|---|
committer | Freeyorp <Freeyorp101@hotmail.com> | 2010-08-13 13:02:45 +1200 |
commit | ab0933b5a4c6cd3ca9f6b13bd011c7e0bf4e546e (patch) | |
tree | e1da71ac25c849157c74ddab9735456869742113 | |
parent | b5c98b278ea09934700ca2e8f03650ea19be1fd1 (diff) | |
download | manaserv-ab0933b5a4c6cd3ca9f6b13bd011c7e0bf4e546e.tar.gz manaserv-ab0933b5a4c6cd3ca9f6b13bd011c7e0bf4e546e.tar.xz manaserv-ab0933b5a4c6cd3ca9f6b13bd011c7e0bf4e546e.zip |
Fix enet check macros.
Not a good idea to have #if checks in a #ifdef check.
Trivial fix.
-rw-r--r-- | src/net/connection.cpp | 4 | ||||
-rw-r--r-- | src/net/connectionhandler.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/net/connection.cpp b/src/net/connection.cpp index 4275105..aeda22a 100644 --- a/src/net/connection.cpp +++ b/src/net/connection.cpp @@ -42,7 +42,7 @@ bool Connection::start(const std::string &address, int port) enet_address_set_host(&enetAddress, address.c_str()); enetAddress.port = port; -#ifdef defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF +#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF mLocal = enet_host_create(NULL /* create a client host */, 1 /* allow one outgoing connection */, 0 /* unlimited channel count */, @@ -59,7 +59,7 @@ bool Connection::start(const std::string &address, int port) return false; // Initiate the connection, allocating channel 0. -#ifdef defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF +#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF mRemote = enet_host_connect(mLocal, &enetAddress, 1, 0); #else mRemote = enet_host_connect(mLocal, &enetAddress, 1); diff --git a/src/net/connectionhandler.cpp b/src/net/connectionhandler.cpp index 314eb0f..ec78666 100644 --- a/src/net/connectionhandler.cpp +++ b/src/net/connectionhandler.cpp @@ -46,7 +46,7 @@ bool ConnectionHandler::startListen(enet_uint16 port, enet_address_set_host(&address, listenHost.c_str()); LOG_INFO("Listening on port " << port << "..."); -#ifdef defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF +#if defined(ENET_VERSION) && ENET_VERSION >= ENET_CUTOFF host = enet_host_create( &address /* the address to bind the server host to */, Configuration::getValue("net_maxClients", 1000) /* allowed connections */, |