diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-06-23 02:46:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-06-23 02:48:43 +0300 |
commit | a69a87c5a81ddbf25a25c5549259da550d207bda (patch) | |
tree | 59f1a919b327912395ab84bab1684118bf0379be /src/net/manaserv/attributes.cpp | |
parent | e646f2fae3f323b7faa26aa9540524d1765211ee (diff) | |
download | manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.gz manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.bz2 manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.tar.xz manaverse-a69a87c5a81ddbf25a25c5549259da550d207bda.zip |
Improve a bit iterators again.
Diffstat (limited to 'src/net/manaserv/attributes.cpp')
-rw-r--r-- | src/net/manaserv/attributes.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/net/manaserv/attributes.cpp b/src/net/manaserv/attributes.cpp index 47eb5b253..a03e510fb 100644 --- a/src/net/manaserv/attributes.cpp +++ b/src/net/manaserv/attributes.cpp @@ -92,8 +92,8 @@ namespace Attributes { // Fill up the modifiable attribute label list. attributeLabels.clear(); - AttributeMap::const_iterator it, it_end; - for (it = attributes.begin(), it_end = attributes.end(); + for (AttributeMap::const_iterator it = attributes.begin(), + it_end = attributes.end(); it != it_end; ++it) { if (it->second.modifiable && (it->second.scope == "character" @@ -383,10 +383,11 @@ namespace Attributes { std::vector<ItemDB::Stat> dbStats; - TagMap::const_iterator it, it_end; - for (it = tags.begin(), it_end = tags.end(); it != it_end; ++it) + for (TagMap::const_iterator it = tags.begin(), it_end = tags.end(); + it != it_end; ++it) + { dbStats.push_back(ItemDB::Stat(it->first, it->second)); - + } ItemDB::setStatsList(dbStats); } @@ -395,8 +396,8 @@ namespace Attributes if (!statusWindow) return; - AttributeMap::const_iterator it, it_end; - for (it = attributes.begin(), it_end = attributes.end(); + for (AttributeMap::const_iterator it = attributes.begin(), + it_end = attributes.end(); it != it_end; ++it) { if (it->second.playerInfoId == -1 |