From f2b579077649d5f40e0e60b53e60fe3b4804dada Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 30 Apr 2014 17:36:51 +0200 Subject: Fixed a warning when an empty item is being created. --- src/Item.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 00316c188..641c681db 100644 --- a/src/Item.h +++ b/src/Item.h @@ -64,7 +64,7 @@ public: { if (!IsValidItem(m_ItemType)) { - if (m_ItemType != E_BLOCK_AIR) + if ((m_ItemType != E_BLOCK_AIR) && (m_ItemType != E_ITEM_EMPTY)) { LOGWARNING("%s: creating an invalid item type (%d), resetting to empty.", __FUNCTION__, a_ItemType); } -- cgit v1.2.3 From b0056cdcf8a36efbed4b97414ebf5741b56a5895 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 1 May 2014 22:02:25 +0200 Subject: Removed the explicit copy constructor for cItem. The compiler generates an implicit one with the same contents and warns about it. The function left in for ToLua to generate the binding for it. --- src/Item.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Item.h') diff --git a/src/Item.h b/src/Item.h index 641c681db..8eb0a1f4e 100644 --- a/src/Item.h +++ b/src/Item.h @@ -73,6 +73,10 @@ public: } + // The constructor is disabled in code, because the compiler generates it anyway, + // but it needs to stay because ToLua needs to generate the binding for it + #if 0 + /** Creates an exact copy of the item */ cItem(const cItem & a_CopyFrom) : m_ItemType (a_CopyFrom.m_ItemType), @@ -85,6 +89,8 @@ public: { } + #endif + void Empty(void) { -- cgit v1.2.3