diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-18 20:14:23 +0100 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-02-18 20:16:53 +0100 |
commit | 7e43b82e3b7cda034fab34c15ecfaa97c1a99146 (patch) | |
tree | 71e24c3ef685d95b8fdf6c548a46b8516915d339 /src/net | |
parent | 9568a305878d0c035e027c1ed6c9a24147a0adea (diff) | |
download | mana-client-7e43b82e3b7cda034fab34c15ecfaa97c1a99146.tar.gz mana-client-7e43b82e3b7cda034fab34c15ecfaa97c1a99146.tar.bz2 mana-client-7e43b82e3b7cda034fab34c15ecfaa97c1a99146.tar.xz mana-client-7e43b82e3b7cda034fab34c15ecfaa97c1a99146.zip |
Introduced a toLower method and grouped string utils
The string utility methods are now grouped together in the stringutils.h
header. Also, a toLower method was added for convenience.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/charserverhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/chathandler.cpp | 3 | ||||
-rw-r--r-- | src/net/inventoryhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/loginhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/network.cpp | 4 | ||||
-rw-r--r-- | src/net/playerhandler.cpp | 2 |
6 files changed, 9 insertions, 10 deletions
diff --git a/src/net/charserverhandler.cpp b/src/net/charserverhandler.cpp index 932cf705..8e743bf0 100644 --- a/src/net/charserverhandler.cpp +++ b/src/net/charserverhandler.cpp @@ -33,7 +33,7 @@ #include "../gui/ok_dialog.h" #include "../utils/gettext.h" -#include "../utils/tostring.h" +#include "../utils/stringutils.h" CharServerHandler::CharServerHandler(): mCharCreateDialog(0) @@ -165,7 +165,7 @@ void CharServerHandler::handleMessage(MessageIn *msg) slot = mCharInfo->getPos(); msg->skip(4); // CharID, must be the same as player_node->charID map_path = msg->readString(16); - mLoginData->hostname = iptostring(msg->readInt32()); + mLoginData->hostname = ipToString(msg->readInt32()); mLoginData->port = msg->readInt16(); mCharInfo->unlock(); mCharInfo->select(0); diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index 25877907..a3ccc4fb 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -34,8 +34,7 @@ #include "../gui/chat.h" #include "../utils/gettext.h" -#include "../utils/tostring.h" -#include "../utils/trim.h" +#include "../utils/stringutils.h" extern Being *player_node; diff --git a/src/net/inventoryhandler.cpp b/src/net/inventoryhandler.cpp index 46f03e28..d5ac0c29 100644 --- a/src/net/inventoryhandler.cpp +++ b/src/net/inventoryhandler.cpp @@ -37,7 +37,7 @@ #include "../utils/gettext.h" #include "../utils/strprintf.h" -#include "../utils/tostring.h" +#include "../utils/stringutils.h" InventoryHandler::InventoryHandler() { diff --git a/src/net/loginhandler.cpp b/src/net/loginhandler.cpp index 4fd0f373..2695fc7b 100644 --- a/src/net/loginhandler.cpp +++ b/src/net/loginhandler.cpp @@ -30,7 +30,7 @@ #include "../utils/gettext.h" #include "../utils/strprintf.h" -#include "../utils/tostring.h" +#include "../utils/stringutils.h" extern SERVER_INFO **server_info; @@ -110,7 +110,7 @@ void LoginHandler::handleMessage(MessageIn *msg) logger->log("Network: Server: %s (%s:%d)", server_info[i]->name.c_str(), - iptostring(server_info[i]->address), + ipToString(server_info[i]->address), server_info[i]->port); } state = CHAR_SERVER_STATE; diff --git a/src/net/network.cpp b/src/net/network.cpp index 059da779..3fa046c4 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -26,7 +26,7 @@ #include "network.h" #include "../log.h" -#include "../utils/tostring.h" +#include "../utils/stringutils.h" /** Warning: buffers and other variables are shared, so there can be only one connection active at a time */ @@ -326,7 +326,7 @@ bool Network::realConnect() } logger->log("Network::Started session with %s:%i", - iptostring(ipAddress.host), ipAddress.port); + ipToString(ipAddress.host), ipAddress.port); mState = CONNECTED; diff --git a/src/net/playerhandler.cpp b/src/net/playerhandler.cpp index 74e959da..fc3506fb 100644 --- a/src/net/playerhandler.cpp +++ b/src/net/playerhandler.cpp @@ -39,7 +39,7 @@ #include "../gui/skill.h" #include "../gui/viewport.h" -#include "../utils/tostring.h" +#include "../utils/stringutils.h" #include "../utils/gettext.h" // TODO Move somewhere else |