summaryrefslogtreecommitdiff
path: root/src/resources/itemdb.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/resources/itemdb.h
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-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.h')
-rw-r--r--src/resources/itemdb.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/resources/itemdb.h b/src/resources/itemdb.h
index 2f19339d..016e6194 100644
--- a/src/resources/itemdb.h
+++ b/src/resources/itemdb.h
@@ -74,7 +74,7 @@ class ItemDB
{
public:
ItemDB() :
- mUnknown(0),
+ mUnknown(nullptr),
mLoaded(false)
{}
@@ -147,8 +147,8 @@ class ItemDB
void loadFloorSprite(SpriteDisplay *display, xmlNodePtr node);
// Items database
- typedef std::map<int, ItemInfo*> ItemInfos;
- typedef std::map<std::string, ItemInfo*> NamedItemInfos;
+ using ItemInfos = std::map<int, ItemInfo *>;
+ using NamedItemInfos = std::map<std::string, ItemInfo *>;
ItemInfos mItemInfos;
NamedItemInfos mNamedItemInfos;
@@ -167,14 +167,14 @@ class TaItemDB: public ItemDB
TaItemDB() : ItemDB()
{ }
- ~TaItemDB()
+ ~TaItemDB() override
{ unload(); }
- virtual void init();
+ void init() override;
- virtual void readItemNode(xmlNodePtr node, const std::string &filename);
+ void readItemNode(xmlNodePtr node, const std::string &filename) override;
- virtual void checkStatus();
+ void checkStatus() override;
private:
/**
* Check items id specific hard limits and log errors found.
@@ -183,7 +183,7 @@ class TaItemDB: public ItemDB
void checkHairWeaponsRacesSpecialIds()
{}
- void checkItemInfo(ItemInfo* itemInfo);
+ void checkItemInfo(ItemInfo* itemInfo) override;
};
} // namespace TmwAthena
@@ -201,17 +201,17 @@ class ManaServItemDB: public ItemDB
ManaServItemDB() : ItemDB()
{ }
- ~ManaServItemDB()
+ ~ManaServItemDB() override
{ unload(); }
- virtual void init();
+ void init() override;
- virtual void readItemNode(xmlNodePtr node, const std::string &filename);
+ void readItemNode(xmlNodePtr node, const std::string &filename) override;
- virtual void checkStatus();
+ void checkStatus() override;
private:
- void checkItemInfo(ItemInfo* itemInfo);
+ void checkItemInfo(ItemInfo* itemInfo) override;
};
} // namespace ManaServ