summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-03-29 03:51:37 +0300
committerAndrei Karas <akaras@inbox.ru>2012-03-29 03:52:16 +0300
commit3bf4e26b1319295532bb4396cbd6406d85cbcae0 (patch)
tree80a4303b29aafa21683e90e45798283a482bf1d1 /src/playerrelations.cpp
parent7f607a0f58a9eba53237955c06bf445c71d57b6c (diff)
downloadplus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.tar.gz
plus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.tar.bz2
plus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.tar.xz
plus-3bf4e26b1319295532bb4396cbd6406d85cbcae0.zip
Replace vectors with strings to short names.
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r--src/playerrelations.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 38062c352..11118aee1 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -140,12 +140,9 @@ PlayerRelationsManager::~PlayerRelationsManager()
void PlayerRelationsManager::clear()
{
- std::vector<std::string> *names = getPlayers();
- for (std::vector<std::string>::const_iterator
- it = names->begin(); it != names->end(); ++it)
- {
+ StringVect *names = getPlayers();
+ for (StringVectCIter it = names->begin(); it != names->end(); ++ it)
removePlayer(*it);
- }
delete names;
names = nullptr;
}
@@ -345,9 +342,9 @@ void PlayerRelationsManager::setRelation(const std::string &player_name,
signalUpdate(player_name);
}
-std::vector<std::string> * PlayerRelationsManager::getPlayers()
+StringVect * PlayerRelationsManager::getPlayers()
{
- std::vector<std::string> *retval = new std::vector<std::string>();
+ StringVect *retval = new StringVect();
for (std::map<std::string,
PlayerRelation *>::const_iterator it = mRelations.begin();
@@ -362,10 +359,10 @@ std::vector<std::string> * PlayerRelationsManager::getPlayers()
return retval;
}
-std::vector<std::string> *PlayerRelationsManager::getPlayersByRelation(
+StringVect *PlayerRelationsManager::getPlayersByRelation(
PlayerRelation::Relation rel)
{
- std::vector<std::string> *retval = new std::vector<std::string>();
+ StringVect *retval = new StringVect();
for (std::map<std::string,
PlayerRelation *>::const_iterator it = mRelations.begin();