From 7e43b82e3b7cda034fab34c15ecfaa97c1a99146 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Wed, 18 Feb 2009 20:14:23 +0100 Subject: 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. --- src/net/charserverhandler.cpp | 4 ++-- src/net/chathandler.cpp | 3 +-- src/net/inventoryhandler.cpp | 2 +- src/net/loginhandler.cpp | 4 ++-- src/net/network.cpp | 4 ++-- src/net/playerhandler.cpp | 2 +- 6 files changed, 9 insertions(+), 10 deletions(-) (limited to 'src/net') 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 -- cgit v1.2.3-70-g09d2