diff options
author | Mattes D <github@xoft.cz> | 2015-04-20 09:17:12 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-04-20 09:17:26 +0200 |
commit | b97f41b8c6df2e755a176f76c5ad098fe463259a (patch) | |
tree | be7da0103e238999ea27d8aa3abf6208a78cc622 | |
parent | Merge pull request #1878 from jammet/patch-2 (diff) | |
download | cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.tar cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.tar.gz cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.tar.bz2 cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.tar.lz cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.tar.xz cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.tar.zst cuberite-b97f41b8c6df2e755a176f76c5ad098fe463259a.zip |
-rw-r--r-- | src/Items/ItemHandler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Items/ItemHandler.cpp b/src/Items/ItemHandler.cpp index d61c883b2..dddd67cdd 100644 --- a/src/Items/ItemHandler.cpp +++ b/src/Items/ItemHandler.cpp @@ -72,7 +72,7 @@ cItemHandler * cItemHandler::m_ItemHandler[2268]; cItemHandler * cItemHandler::GetItemHandler(int a_ItemType) { - if ((a_ItemType < 0) || ((size_t)a_ItemType >= ARRAYCOUNT(m_ItemHandler))) + if ((a_ItemType < 0) || (static_cast<size_t>(a_ItemType) >= ARRAYCOUNT(m_ItemHandler))) { // Either nothing (-1), or bad value, both cases should return the air handler if (a_ItemType < -1) @@ -287,7 +287,7 @@ cItemHandler * cItemHandler::CreateItemHandler(int a_ItemType) void cItemHandler::Deinit() { - for (int i = 0; i < ARRAYCOUNT(m_ItemHandler); i++) + for (size_t i = 0; i < ARRAYCOUNT(m_ItemHandler); i++) { delete m_ItemHandler[i]; m_ItemHandler[i] = nullptr; |