summaryrefslogtreecommitdiff
path: root/src/gui/shortcut/itemshortcut.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-08 20:18:08 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-08 20:18:08 +0300
commit91e74d8f1dc3f1fe01cb65822913488f5cbc5657 (patch)
tree7cd1485d11ca1915504ba6ed6e92c0d7ca0d97d0 /src/gui/shortcut/itemshortcut.h
parentd1dcddb018c74aebf0ffb2bbde1501685372c2d8 (diff)
downloadplus-91e74d8f1dc3f1fe01cb65822913488f5cbc5657.tar.gz
plus-91e74d8f1dc3f1fe01cb65822913488f5cbc5657.tar.bz2
plus-91e74d8f1dc3f1fe01cb65822913488f5cbc5657.tar.xz
plus-91e74d8f1dc3f1fe01cb65822913488f5cbc5657.zip
Use size_t type for index in itemshortcut.
Diffstat (limited to 'src/gui/shortcut/itemshortcut.h')
-rw-r--r--src/gui/shortcut/itemshortcut.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gui/shortcut/itemshortcut.h b/src/gui/shortcut/itemshortcut.h
index 8aa7a9efc..5e77e9152 100644
--- a/src/gui/shortcut/itemshortcut.h
+++ b/src/gui/shortcut/itemshortcut.h
@@ -66,10 +66,10 @@ class ItemShortcut final
*
* @param index Index of the shortcut item.
*/
- int getItem(const int index) const A_WARN_UNUSED
+ int getItem(const size_t index) const A_WARN_UNUSED
{ return mItems[index]; }
- ItemColor getItemColor(const int index) const A_WARN_UNUSED
+ ItemColor getItemColor(const size_t index) const A_WARN_UNUSED
{ return mItemColors[index]; }
void setItemData(const size_t index,
@@ -96,9 +96,9 @@ class ItemShortcut final
*
* @param index Index of the items.
*/
- void setItem(const int index);
+ void setItem(const size_t index);
- void setItem(const int index,
+ void setItem(const size_t index,
const int item,
const ItemColor color);
@@ -112,7 +112,7 @@ class ItemShortcut final
* @param index Index of the item.
* @param itemId ID of the item.
*/
- void setItems(const int index,
+ void setItems(const size_t index,
const int itemId,
const ItemColor color)
{ mItems[index] = itemId; mItemColors[index] = color; save(); }
@@ -142,7 +142,7 @@ class ItemShortcut final
/**
* Remove a item from the shortcut.
*/
- void removeItem(const int index)
+ void removeItem(const size_t index)
{ mItems[index] = -1; save(); }
/**
@@ -150,19 +150,20 @@ class ItemShortcut final
*
* @param index Index of the item shortcut.
*/
- void useItem(const int index) const;
+ void useItem(const size_t index) const;
/**
* Equip a item from the shortcut.
*/
- void equipItem(const int index) const;
+ void equipItem(const size_t index) const;
/**
* UnEquip a item from the shortcut.
*/
- void unequipItem(const int index) const;
+ void unequipItem(const size_t index) const;
- void swap(const int index1, const int index2);
+ void swap(const size_t index1,
+ const size_t index2);
void clear();