diff options
author | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-10-21 20:54:54 +0200 |
---|---|---|
committer | Thorbjørn Lindeijer <thorbjorn@lindeijer.nl> | 2011-10-23 10:55:29 +0200 |
commit | 9c5791d3e3b413d8b703f1530f67de8936a3434c (patch) | |
tree | dd718ab5e09a0128f94509fed3c8b241c23e8dfa /src/playerrelations.cpp | |
parent | 659b1eac4fc9e733fcfd233020bac78701c30640 (diff) | |
download | mana-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.cpp | 9 |
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; } |