summaryrefslogtreecommitdiff
path: root/src/item.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-14 23:43:54 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-14 23:43:54 +0300
commit15a79eee1b3baa91953daf33dc021a1e7c147365 (patch)
tree21fc078237a8c635308c1e84e0bba869918ba3d5 /src/item.h
parente1841e31c606f1d97ea54c3f00f3380db814f3d2 (diff)
downloadmv-15a79eee1b3baa91953daf33dc021a1e7c147365.tar.gz
mv-15a79eee1b3baa91953daf33dc021a1e7c147365.tar.bz2
mv-15a79eee1b3baa91953daf33dc021a1e7c147365.tar.xz
mv-15a79eee1b3baa91953daf33dc021a1e7c147365.zip
Change refine type to uint8_t.
Diffstat (limited to 'src/item.h')
-rw-r--r--src/item.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/item.h b/src/item.h
index 0e8b47aef..208be2cc6 100644
--- a/src/item.h
+++ b/src/item.h
@@ -40,8 +40,10 @@ class Item notfinal
/**
* Constructor.
*/
- explicit Item(const int id = -1, const int quantity = 0,
- const int refine = 0, const unsigned char color = 1,
+ explicit Item(const int id = -1,
+ const int quantity = 0,
+ const uint8_t refine = 0,
+ const uint8_t color = 1,
const bool equipment = false,
const bool equipped = false);
@@ -114,13 +116,13 @@ class Item notfinal
/**
* Sets this item refine level.
*/
- void setRefine(const int refine)
+ void setRefine(const uint8_t refine)
{ mRefine = refine; }
/**
* Returns this item refine level.
*/
- int getRefine() const A_WARN_UNUSED
+ uint8_t getRefine() const A_WARN_UNUSED
{ return mRefine; }
/**
@@ -174,7 +176,7 @@ class Item notfinal
Image *mImage; /**< Item image. */
std::string mDescription;
std::map <int, int> mTags;
- int mRefine; /**< Item refine level. */
+ uint8_t mRefine; /**< Item refine level. */
int mInvIndex; /**< Inventory index. */
bool mEquipment; /**< Item is equipment. */
bool mEquipped; /**< Item is equipped. */