summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-20 16:39:17 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-20 16:39:17 +0300
commitab9405f511303d490a8f966d1c1abe7f94bf0633 (patch)
tree2be8b455633f6aa960c40e09f602637c7242c261 /src/net
parent73fac88b0263962c90d2d649938e6a4a5b11a246 (diff)
downloadmv-ab9405f511303d490a8f966d1c1abe7f94bf0633.tar.gz
mv-ab9405f511303d490a8f966d1c1abe7f94bf0633.tar.bz2
mv-ab9405f511303d490a8f966d1c1abe7f94bf0633.tar.xz
mv-ab9405f511303d490a8f966d1c1abe7f94bf0633.zip
fix style in net directory.
Diffstat (limited to 'src/net')
-rw-r--r--src/net/charserverhandler.h4
-rw-r--r--src/net/download.cpp1
-rw-r--r--src/net/ea/chathandler.cpp1
-rw-r--r--src/net/ea/gamehandler.cpp1
-rw-r--r--src/net/ea/inventoryhandler.cpp5
-rw-r--r--src/net/ea/itemhandler.cpp4
-rw-r--r--src/net/ea/itemhandler.h2
-rw-r--r--src/net/ea/loginhandler.cpp5
-rw-r--r--src/net/ea/network.cpp2
-rw-r--r--src/net/ea/network.h2
-rw-r--r--src/net/ea/npchandler.cpp1
-rw-r--r--src/net/logindata.h6
-rw-r--r--src/net/loginhandler.h5
-rw-r--r--src/net/messagehandler.h7
-rw-r--r--src/net/serverinfo.h6
-rw-r--r--src/net/worldinfo.h9
16 files changed, 55 insertions, 6 deletions
diff --git a/src/net/charserverhandler.h b/src/net/charserverhandler.h
index 9bbba0ab4..de5973897 100644
--- a/src/net/charserverhandler.h
+++ b/src/net/charserverhandler.h
@@ -43,7 +43,8 @@ struct Character final
{
Character() :
slot(0),
- dummy(nullptr)
+ dummy(nullptr),
+ data()
{
}
@@ -98,6 +99,7 @@ class CharServerHandler
protected:
CharServerHandler() :
+ mCharacters(),
mSelectedCharacter(nullptr),
mCharSelectDialog(nullptr),
mCharCreateDialog(nullptr)
diff --git a/src/net/download.cpp b/src/net/download.cpp
index afec61d0f..2d8b99cb6 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -56,6 +56,7 @@ Download::Download(void *const ptr, const std::string &url,
const bool ignoreError) :
mPtr(ptr),
mUrl(url),
+ mOptions(),
mFileName(""),
mWriteFunction(nullptr),
mAdler(0),
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index 872878511..a84ab21e0 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -43,6 +43,7 @@ namespace Ea
{
ChatHandler::ChatHandler() :
+ mSentWhispers(),
mShowAllLang(serverConfig.getValue("showAllLang", 0))
{
}
diff --git a/src/net/ea/gamehandler.cpp b/src/net/ea/gamehandler.cpp
index 0e159bd76..faee4b2d8 100644
--- a/src/net/ea/gamehandler.cpp
+++ b/src/net/ea/gamehandler.cpp
@@ -35,6 +35,7 @@ namespace Ea
{
GameHandler::GameHandler() :
+ mMap(),
mCharID(0)
{
}
diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp
index 21087d355..086a05102 100644
--- a/src/net/ea/inventoryhandler.cpp
+++ b/src/net/ea/inventoryhandler.cpp
@@ -74,9 +74,12 @@ namespace Ea
{
InventoryHandler::InventoryHandler() :
+ mEquips(),
+ mInventoryItems(),
mStorage(nullptr),
mStorageWindow(nullptr),
- mDebugInventory(true)
+ mDebugInventory(true),
+ mSentPickups()
{
}
diff --git a/src/net/ea/itemhandler.cpp b/src/net/ea/itemhandler.cpp
index 6c7124e30..aafe6fc4b 100644
--- a/src/net/ea/itemhandler.cpp
+++ b/src/net/ea/itemhandler.cpp
@@ -33,6 +33,10 @@ ItemHandler::ItemHandler()
{
}
+ItemHandler::~ItemHandler()
+{
+}
+
void ItemHandler::processItemVisible(Net::MessageIn &msg)
{
const int id = msg.readInt32();
diff --git a/src/net/ea/itemhandler.h b/src/net/ea/itemhandler.h
index cd56f2d12..72f64bfb8 100644
--- a/src/net/ea/itemhandler.h
+++ b/src/net/ea/itemhandler.h
@@ -36,6 +36,8 @@ class ItemHandler
A_DELETE_COPY(ItemHandler)
+ virtual ~ItemHandler();
+
void processItemVisible(Net::MessageIn &msg);
void processItemRemove(Net::MessageIn &msg);
diff --git a/src/net/ea/loginhandler.cpp b/src/net/ea/loginhandler.cpp
index f94771eec..c50f76cdd 100644
--- a/src/net/ea/loginhandler.cpp
+++ b/src/net/ea/loginhandler.cpp
@@ -40,7 +40,10 @@ namespace Ea
LoginHandler::LoginHandler() :
Net::LoginHandler(),
mVersionResponse(false),
- mRegistrationEnabled(true)
+ mRegistrationEnabled(true),
+ mUpdateHost(),
+ mWorlds(),
+ mToken()
{
mToken.clear();
}
diff --git a/src/net/ea/network.cpp b/src/net/ea/network.cpp
index 679447a50..6c24954b7 100644
--- a/src/net/ea/network.cpp
+++ b/src/net/ea/network.cpp
@@ -56,12 +56,14 @@ int networkThread(void *data)
Network::Network() :
mSocket(nullptr),
+ mServer(),
mInBuffer(new char[BUFFER_SIZE]),
mOutBuffer(new char[BUFFER_SIZE]),
mInSize(0),
mOutSize(0),
mToSkip(0),
mState(IDLE),
+ mError(),
mWorkerThread(nullptr),
mMutex(SDL_CreateMutex()),
mSleep(config.getIntValue("networksleep"))
diff --git a/src/net/ea/network.h b/src/net/ea/network.h
index e0066afaf..2f8a1c0d1 100644
--- a/src/net/ea/network.h
+++ b/src/net/ea/network.h
@@ -45,7 +45,7 @@ class Network
A_DELETE_COPY(Network)
- ~Network();
+ virtual ~Network();
bool connect(ServerInfo server);
diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp
index cacb65548..51e006779 100644
--- a/src/net/ea/npchandler.cpp
+++ b/src/net/ea/npchandler.cpp
@@ -30,6 +30,7 @@ namespace Ea
{
NpcHandler::NpcHandler() :
+ mNpcDialogs(),
mDialog(nullptr)
{
}
diff --git a/src/net/logindata.h b/src/net/logindata.h
index a36150fa3..6e133b267 100644
--- a/src/net/logindata.h
+++ b/src/net/logindata.h
@@ -35,15 +35,17 @@ class LoginData final
password(""),
newPassword(""),
updateHost(""),
+ updateHosts(),
+ lastLogin(),
updateType(0),
email(""),
captchaResponse(""),
registerUrl(""),
gender(GENDER_UNSPECIFIED),
remember(false),
- registerLogin(false)
+ registerLogin(false),
+ characterSlots(9)
{
- resetCharacterSlots();
}
A_DELETE_COPY(LoginData)
diff --git a/src/net/loginhandler.h b/src/net/loginhandler.h
index 224724e6b..cc10a8ae1 100644
--- a/src/net/loginhandler.h
+++ b/src/net/loginhandler.h
@@ -103,6 +103,11 @@ class LoginHandler
virtual void clearWorlds() = 0;
+ LoginHandler() :
+ mServer()
+ {
+ }
+
virtual ~LoginHandler()
{ }
diff --git a/src/net/messagehandler.h b/src/net/messagehandler.h
index fdf552403..c438ed679 100644
--- a/src/net/messagehandler.h
+++ b/src/net/messagehandler.h
@@ -42,6 +42,13 @@ class MessageHandler
virtual void handleMessage(MessageIn &msg) = 0;
+ MessageHandler() :
+ handledMessages(nullptr)
+ {
+ }
+
+ A_DELETE_COPY(MessageHandler)
+
virtual ~MessageHandler()
{ }
};
diff --git a/src/net/serverinfo.h b/src/net/serverinfo.h
index af36c27e6..114295560 100644
--- a/src/net/serverinfo.h
+++ b/src/net/serverinfo.h
@@ -57,7 +57,12 @@ public:
ServerInfo() :
type(TMWATHENA),
+ name(),
+ hostname(),
port(6901),
+ description(),
+ registerUrl(),
+ version(),
save(false)
{
version.first = 0;
@@ -70,6 +75,7 @@ public:
port(info.port),
description(info.description),
registerUrl(info.registerUrl),
+ version(),
save(info.save)
{
version.first = info.version.first;
diff --git a/src/net/worldinfo.h b/src/net/worldinfo.h
index 65f8ae978..ebc45343a 100644
--- a/src/net/worldinfo.h
+++ b/src/net/worldinfo.h
@@ -28,6 +28,15 @@
struct WorldInfo final
{
+ WorldInfo() :
+ address(0),
+ name(),
+ port(0),
+ online_users(0),
+ updateHost()
+ {
+ }
+
int address;
std::string name;
short port;