summaryrefslogtreecommitdiff
path: root/src/playerrelations.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-10-21 20:54:54 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-10-23 10:55:29 +0200
commit9c5791d3e3b413d8b703f1530f67de8936a3434c (patch)
treedd718ab5e09a0128f94509fed3c8b241c23e8dfa /src/playerrelations.cpp
parent659b1eac4fc9e733fcfd233020bac78701c30640 (diff)
downloadmana-9c5791d3e3b413d8b703f1530f67de8936a3434c.tar.gz
mana-9c5791d3e3b413d8b703f1530f67de8936a3434c.tar.bz2
mana-9c5791d3e3b413d8b703f1530f67de8936a3434c.tar.xz
mana-9c5791d3e3b413d8b703f1530f67de8936a3434c.zip
Fixed a certain class of Doxygen warnings
All cases of documentation for non-existing parameters are now fixed. Also marked a few getters as 'const', removed some superfluous 'inline' keywords and removed the unused 'forceQuantity' option from ItemContainer. Reviewed-by: Yohann Ferreira
Diffstat (limited to 'src/playerrelations.cpp')
-rw-r--r--src/playerrelations.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/playerrelations.cpp b/src/playerrelations.cpp
index 8b6e6255..4a70e695 100644
--- a/src/playerrelations.cpp
+++ b/src/playerrelations.cpp
@@ -249,7 +249,7 @@ void PlayerRelationsManager::setRelation(const std::string &player_name,
signalUpdate(player_name);
}
-std::vector<std::string> * PlayerRelationsManager::getPlayers()
+std::vector<std::string> * PlayerRelationsManager::getPlayers() const
{
std::vector<std::string> *retval = new std::vector<std::string>();
@@ -273,10 +273,11 @@ void PlayerRelationsManager::removePlayer(const std::string &name)
}
-PlayerRelation::Relation PlayerRelationsManager::getRelation(const std::string &name)
+PlayerRelation::Relation PlayerRelationsManager::getRelation(const std::string &name) const
{
- if (mRelations[name])
- return mRelations[name]->mRelation;
+ std::map<std::string, PlayerRelation *>::const_iterator it = mRelations.find(name);
+ if (it != mRelations.end())
+ return it->second->mRelation;
return PlayerRelation::NEUTRAL;
}