diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-01-26 16:07:54 +0100 |
commit | 5afe88df2538274859a162ffd63ed52118e80c19 (patch) | |
tree | b610dfd58dc748fd63f49565b2a43eea2316714f /src/resources/itemdb.cpp | |
parent | 73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff) | |
download | mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2 mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz mana-5afe88df2538274859a162ffd63ed52118e80c19.zip |
Apply C++11 fixits
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
Diffstat (limited to 'src/resources/itemdb.cpp')
-rw-r--r-- | src/resources/itemdb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp index 8c1a8d15..225bdb71 100644 --- a/src/resources/itemdb.cpp +++ b/src/resources/itemdb.cpp @@ -180,7 +180,7 @@ void ItemDB::unload() logger->log("Unloading item database..."); delete mUnknown; - mUnknown = NULL; + mUnknown = nullptr; delete_all(mItemInfos); mItemInfos.clear(); @@ -330,7 +330,7 @@ void TaItemDB::init() void TaItemDB::readItemNode(xmlNodePtr node, const std::string &filename) { - TaItemInfo *itemInfo = new TaItemInfo; + auto *itemInfo = new TaItemInfo; loadCommonRef(itemInfo, node, filename); @@ -348,7 +348,7 @@ void TaItemDB::readItemNode(xmlNodePtr node, const std::string &filename) continue; effect.push_back(strprintf(gettext(fields[i][1]), value)); } - for (std::list<ItemStat>::iterator it = extraStats.begin(); + for (auto it = extraStats.begin(); it != extraStats.end(); it++) { int value = XML::getProperty(node, it->mTag.c_str(), 0); @@ -421,7 +421,7 @@ void ManaServItemDB::init() void ManaServItemDB::readItemNode(xmlNodePtr node, const std::string &filename) { - ManaServItemInfo *itemInfo = new ManaServItemInfo; + auto *itemInfo = new ManaServItemInfo; loadCommonRef(itemInfo, node, filename); |