From ab0933b5a4c6cd3ca9f6b13bd011c7e0bf4e546e Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Fri, 13 Aug 2010 13:02:45 +1200 Subject: Fix enet check macros. Not a good idea to have #if checks in a #ifdef check. Trivial fix. --- src/net/connection.cpp | 4 ++-- 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 42751050..aeda22a7 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 314eb0f7..ec786663 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 */, -- cgit v1.2.3-70-g09d2