summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client.cpp2
-rw-r--r--src/dyetool/client.cpp2
-rw-r--r--src/gui/shortcut/itemshortcut.cpp6
-rw-r--r--src/gui/shortcut/itemshortcut.h6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp
index f437f25d5..e050bf5cd 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -436,7 +436,7 @@ void Client::gameInit()
touchManager.init();
// Initialize the item and emote shortcuts.
- for (unsigned f = 0; f < SHORTCUT_TABS; f ++)
+ for (size_t f = 0; f < SHORTCUT_TABS; f ++)
itemShortcut[f] = new ItemShortcut(f);
emoteShortcut = new EmoteShortcut;
dropShortcut = new DropShortcut;
diff --git a/src/dyetool/client.cpp b/src/dyetool/client.cpp
index 8ed409a0a..05a5d365a 100644
--- a/src/dyetool/client.cpp
+++ b/src/dyetool/client.cpp
@@ -307,7 +307,7 @@ void Client::gameInit()
touchManager.init();
// Initialize the item and emote shortcuts.
-// for (unsigned f = 0; f < SHORTCUT_TABS; f ++)
+// for (size_t f = 0; f < SHORTCUT_TABS; f ++)
// itemShortcut[f] = new ItemShortcut(f);
// emoteShortcut = new EmoteShortcut;
// dropShortcut = new DropShortcut;
diff --git a/src/gui/shortcut/itemshortcut.cpp b/src/gui/shortcut/itemshortcut.cpp
index d4e96a3e2..f3457547b 100644
--- a/src/gui/shortcut/itemshortcut.cpp
+++ b/src/gui/shortcut/itemshortcut.cpp
@@ -41,13 +41,13 @@
ItemShortcut *itemShortcut[SHORTCUT_TABS];
-ItemShortcut::ItemShortcut(const int number) :
+ItemShortcut::ItemShortcut(const size_t number) :
mItems(),
mItemColors(),
mItemData(),
+ mNumber(number),
mItemSelected(-1),
- mItemColorSelected(ItemColor_one),
- mNumber(number)
+ mItemColorSelected(ItemColor_one)
{
load();
}
diff --git a/src/gui/shortcut/itemshortcut.h b/src/gui/shortcut/itemshortcut.h
index a2107207d..7f351cabc 100644
--- a/src/gui/shortcut/itemshortcut.h
+++ b/src/gui/shortcut/itemshortcut.h
@@ -31,7 +31,7 @@
const unsigned int SHORTCUT_ITEMS = 20;
const unsigned int SHORTCUT_TABS = 5;
-const unsigned int SHORTCUT_AUTO_TAB = 4;
+const size_t SHORTCUT_AUTO_TAB = 4;
class Item;
@@ -44,7 +44,7 @@ class ItemShortcut final
/**
* Constructor.
*/
- explicit ItemShortcut(const int number);
+ explicit ItemShortcut(const size_t number);
A_DELETE_COPY(ItemShortcut)
@@ -172,9 +172,9 @@ class ItemShortcut final
int mItems[SHORTCUT_ITEMS]; /**< The items. */
ItemColor mItemColors[SHORTCUT_ITEMS]; /**< The item colors. */
std::string mItemData[SHORTCUT_ITEMS];
+ size_t mNumber;
int mItemSelected;
ItemColor mItemColorSelected;
- int mNumber;
};
extern ItemShortcut *itemShortcut[SHORTCUT_TABS];