From b7bbb09d62b55bed26d432a6a2af9831c6ec9143 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 24 Mar 2016 20:42:22 +0300 Subject: Change ItemType into strong typed enum. --- src/enums/resources/itemtype.h | 47 ++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'src/enums/resources') diff --git a/src/enums/resources/itemtype.h b/src/enums/resources/itemtype.h index 489dc3c44..29ad14b54 100644 --- a/src/enums/resources/itemtype.h +++ b/src/enums/resources/itemtype.h @@ -23,31 +23,28 @@ #ifndef RESOURCES_ITEMTYPE_H #define RESOURCES_ITEMTYPE_H -namespace ItemType +#include "enums/simpletypes/enumdefines.h" + +enumStart(ItemType) { - /** - * Enumeration of available Item types. - */ - enum Type - { - UNUSABLE = 0, - USABLE, - EQUIPMENT_ONE_HAND_WEAPON, - EQUIPMENT_TWO_HANDS_WEAPON, - EQUIPMENT_TORSO, - EQUIPMENT_ARMS, // 5 - CARD, - EQUIPMENT_HEAD, - EQUIPMENT_LEGS, - EQUIPMENT_SHIELD, - EQUIPMENT_RING, - EQUIPMENT_NECKLACE, // 10 - EQUIPMENT_FEET, - EQUIPMENT_AMMO, - EQUIPMENT_CHARM, - SPRITE_RACE, - SPRITE_HAIR // 15 - }; -} // namespace ItemType + UNUSABLE = 0, + USABLE, + EQUIPMENT_ONE_HAND_WEAPON, + EQUIPMENT_TWO_HANDS_WEAPON, + EQUIPMENT_TORSO, + EQUIPMENT_ARMS, // 5 + CARD, + EQUIPMENT_HEAD, + EQUIPMENT_LEGS, + EQUIPMENT_SHIELD, + EQUIPMENT_RING, + EQUIPMENT_NECKLACE, // 10 + EQUIPMENT_FEET, + EQUIPMENT_AMMO, + EQUIPMENT_CHARM, + SPRITE_RACE, + SPRITE_HAIR // 15 +} +enumEnd(ItemType); #endif // RESOURCES_ITEMTYPE_H -- cgit v1.2.3-70-g09d2