diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-06 00:04:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-06 00:04:33 +0300 |
commit | 7b155f111daf5d7ae477b16d0f0789b1113bea74 (patch) | |
tree | 2d2711ab1f9daed793171383af1a7e1fa6ff737c /src/net | |
parent | c3afff20d4989ab2835545715bbe67e5b5d9b353 (diff) | |
download | manaplus-7b155f111daf5d7ae477b16d0f0789b1113bea74.tar.gz manaplus-7b155f111daf5d7ae477b16d0f0789b1113bea74.tar.bz2 manaplus-7b155f111daf5d7ae477b16d0f0789b1113bea74.tar.xz manaplus-7b155f111daf5d7ae477b16d0f0789b1113bea74.zip |
Fix some issues after auto checking.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/download.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/gamehandler.cpp | 5 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 8 | ||||
-rw-r--r-- | src/net/manaserv/connection.cpp | 5 | ||||
-rw-r--r-- | src/net/manaserv/loginhandler.cpp | 8 | ||||
-rw-r--r-- | src/net/serverinfo.h | 22 |
6 files changed, 25 insertions, 25 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp index 1acb4b59b..a4eb31603 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -64,9 +64,9 @@ Download::Download(void *ptr, const std::string &url, mThread(nullptr), mCurl(nullptr), mHeaders(nullptr), + mError(static_cast<char*>(calloc(CURL_ERROR_SIZE + 1, 1))), mIgnoreError(ignoreError) { - mError = static_cast<char*>(calloc(CURL_ERROR_SIZE + 1, 1)); mError[0] = 0; mOptions.cancel = 0; diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp index 71110984d..fe6c39645 100644 --- a/src/net/ea/gamehandler.cpp +++ b/src/net/ea/gamehandler.cpp @@ -39,10 +39,9 @@ namespace Ea { -GameHandler::GameHandler() +GameHandler::GameHandler() : + mCharID(0) { - mCharID = 0; - listen(CHANNEL_GAME); } diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index f28e9b396..a03ea45af 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -76,11 +76,11 @@ const Equipment::Slot EQUIP_CONVERT[] = namespace Ea { -InventoryHandler::InventoryHandler() +InventoryHandler::InventoryHandler() : + mStorage(nullptr), + mStorageWindow(nullptr), + mDebugInventory(true) { - mStorage = nullptr; - mStorageWindow = nullptr; - mDebugInventory = true; } InventoryHandler::~InventoryHandler() diff --git a/src/net/manaserv/connection.cpp b/src/net/manaserv/connection.cpp index 2467eb198..7ac05b484 100644 --- a/src/net/manaserv/connection.cpp +++ b/src/net/manaserv/connection.cpp @@ -33,9 +33,10 @@ namespace ManaServ { Connection::Connection(ENetHost *client): - mConnection(0), mClient(client) + mPort(0), + mConnection(0), + mClient(client) { - mPort = 0; connections++; } diff --git a/src/net/manaserv/loginhandler.cpp b/src/net/manaserv/loginhandler.cpp index f93d8e44c..dc8f37d36 100644 --- a/src/net/manaserv/loginhandler.cpp +++ b/src/net/manaserv/loginhandler.cpp @@ -44,7 +44,10 @@ namespace ManaServ extern Connection *accountServerConnection; extern std::string netToken; -LoginHandler::LoginHandler() +LoginHandler::LoginHandler() : + mLoginData(0), + mMinUserNameLength(4), + mMaxUserNameLength(10) { static const Uint16 _messages[] = { @@ -60,9 +63,6 @@ LoginHandler::LoginHandler() }; handledMessages = _messages; loginHandler = this; - mMinUserNameLength = 4; - mMaxUserNameLength = 10; - mLoginData = 0; } void LoginHandler::handleMessage(Net::MessageIn &msg) diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h index b4bb1a2d8..d3c33d19f 100644 --- a/src/net/serverinfo.h +++ b/src/net/serverinfo.h @@ -51,24 +51,24 @@ public: bool save; - ServerInfo() + ServerInfo() : + type(TMWATHENA), + port(6901), + save(false) { - type = TMWATHENA; - port = 6901; - save = false; version.first = 0; } - ServerInfo(const ServerInfo &info) + ServerInfo(const ServerInfo &info) : + type(info.type), + name(info.name), + hostname(info.hostname), + port(info.port), + description(info.description), + save(info.save) { - type = info.type; - name = info.name; - hostname = info.hostname; - port = info.port; - description = info.description; version.first = info.version.first; version.second = info.version.second; - save = info.save; } bool isValid() const |