From 3bf4e26b1319295532bb4396cbd6406d85cbcae0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 29 Mar 2012 03:51:37 +0300 Subject: Replace vectors with strings to short names. --- src/net/ea/charserverhandler.cpp | 2 +- src/net/ea/gui/guildtab.cpp | 2 +- src/net/ea/gui/guildtab.h | 2 +- src/net/ea/gui/partytab.cpp | 2 +- src/net/ea/gui/partytab.h | 2 +- src/net/logindata.h | 2 +- src/net/manaserv/attributes.cpp | 4 ++-- src/net/manaserv/attributes.h | 5 ++--- src/net/tmwa/loginhandler.cpp | 4 ++-- 9 files changed, 12 insertions(+), 13 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 67894b0d9..942ba79a6 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -62,7 +62,7 @@ void CharServerHandler::setCharCreateDialog(CharCreateDialog *window) if (!mCharCreateDialog) return; - std::vector attributes; + StringVect attributes; attributes.push_back(_("Strength:")); attributes.push_back(_("Agility:")); attributes.push_back(_("Vitality:")); diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index bd1521b21..3ab6a48eb 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -139,7 +139,7 @@ void GuildTab::showHelp() chatLog(_("/kick > Kick some one from the guild you are in")); } -void GuildTab::getAutoCompleteList(std::vector &names) const +void GuildTab::getAutoCompleteList(StringVect &names) const { if (taGuild) taGuild->getNames(names); diff --git a/src/net/ea/gui/guildtab.h b/src/net/ea/gui/guildtab.h index 22a41ce80..6ccf70903 100644 --- a/src/net/ea/gui/guildtab.h +++ b/src/net/ea/gui/guildtab.h @@ -52,7 +52,7 @@ class GuildTab : public ChatTab protected: void handleInput(const std::string &msg); - void getAutoCompleteList(std::vector &names) const; + void getAutoCompleteList(StringVect &names) const; }; } // namespace Ea diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index e69207842..0e3b51928 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -225,7 +225,7 @@ bool PartyTab::handleCommand(const std::string &type, const std::string &args) return true; } -void PartyTab::getAutoCompleteList(std::vector &names) const +void PartyTab::getAutoCompleteList(StringVect &names) const { if (!player_node) return; diff --git a/src/net/ea/gui/partytab.h b/src/net/ea/gui/partytab.h index 931b283dd..a92f6e207 100644 --- a/src/net/ea/gui/partytab.h +++ b/src/net/ea/gui/partytab.h @@ -52,7 +52,7 @@ class PartyTab : public ChatTab protected: void handleInput(const std::string &msg); - virtual void getAutoCompleteList(std::vector&) const; + virtual void getAutoCompleteList(StringVect&) const; }; extern PartyTab *partyTab; diff --git a/src/net/logindata.h b/src/net/logindata.h index 0f41b02ae..bf0ac40b1 100644 --- a/src/net/logindata.h +++ b/src/net/logindata.h @@ -59,7 +59,7 @@ class LoginData std::string password; std::string newPassword; std::string updateHost; - std::vector updateHosts; + StringVect updateHosts; std::string lastLogin; int updateType; diff --git a/src/net/manaserv/attributes.cpp b/src/net/manaserv/attributes.cpp index 662032e29..9d1e159ff 100644 --- a/src/net/manaserv/attributes.cpp +++ b/src/net/manaserv/attributes.cpp @@ -66,7 +66,7 @@ namespace Attributes static TagMap tags; /** List of modifiable attribute names used at character's creation. */ - static std::vector attributeLabels; + static StringVect attributeLabels; /** Characters creation points. */ static unsigned int creationPoints = 0; @@ -82,7 +82,7 @@ namespace Attributes unsigned int getAttributeMaximum() { return attributeMaximum; } - std::vector& getLabels() + StringVect& getLabels() { return attributeLabels; } /** diff --git a/src/net/manaserv/attributes.h b/src/net/manaserv/attributes.h index ba5931b8c..5e0aab38a 100644 --- a/src/net/manaserv/attributes.h +++ b/src/net/manaserv/attributes.h @@ -22,8 +22,7 @@ #ifndef NET_MANASERV_ATTRIBUTES_H #define NET_MANASERV_ATTRIBUTES_H -#include -#include +#include "utils/stringvector.h" namespace ManaServ { @@ -41,7 +40,7 @@ namespace Attributes /** * Returns the list of base attribute labels. */ - std::vector& getLabels(); + StringVect& getLabels(); /** * Give back the corresponding playerinfo Id from the attribute id diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index a2c5034d6..242270d13 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -197,8 +197,8 @@ void LoginHandler::processUpdateHost2(Net::MessageIn &msg) std::string updateHost = msg.readString(len); splitToStringVector(loginData.updateHosts, updateHost, '|'); - std::vector::iterator it = loginData.updateHosts.begin(); - std::vector::iterator it_end = loginData.updateHosts.end(); + StringVectIter it = loginData.updateHosts.begin(); + StringVectIter it_end = loginData.updateHosts.end(); for (; it != it_end; ++ it) { if (!checkPath(*it)) -- cgit v1.2.3-60-g2f50