Some refactoring needed?
#36
I'm afraid there's one more problem with the refactoring - now the project won't compile on Mac OS X, and possibly other *nixes. GCC complains that it cannot pass a temporary cItem object to a function expecting a cItem reference:
Code:
In file included from source/items/Item.cpp:10:
source/items/ItemSlab.h: In member function ‘virtual bool cItemSlabHandler::OnItemUse(cWorld*, cPlayer*, cItem*, int, int, int, char)’:
source/items/ItemSlab.h:26: error: no matching function for call to ‘cInventory::RemoveItem(cItem)’
source/items/../cInventory.h:35: note: candidates are: bool cInventory::RemoveItem(cItem&)
In file included from source/items/Item.cpp:15:
source/items/ItemBucket.h: In member function ‘virtual bool cItemBucketHandler::OnItemUse(cWorld*, cPlayer*, cItem*, int, int, int, char)’:
source/items/ItemBucket.h:37: error: no matching function for call to ‘cInventory::RemoveItem(cItem)’
source/items/../cInventory.h:35: note: candidates are: bool cInventory::RemoveItem(cItem&)
source/items/ItemBucket.h:40: error: no matching function for call to ‘cInventory::AddItem(cItem)’
source/items/../cInventory.h:34: note: candidates are: bool cInventory::AddItem(cItem&)
source/items/ItemBucket.h:55: error: no matching function for call to ‘cInventory::RemoveItem(cItem)’
source/items/../cInventory.h:35: note: candidates are: bool cInventory::RemoveItem(cItem&)
source/items/ItemBucket.h:64: error: no matching function for call to ‘cInventory::AddItem(cItem)’
source/items/../cInventory.h:34: note: candidates are: bool cInventory::AddItem(cItem&)
In file included from source/items/Item.cpp:20:
source/items/ItemDye.h: In member function ‘virtual bool cItemDyeHandler::OnItemUse(cWorld*, cPlayer*, cItem*, int, int, int, char)’:
source/items/ItemDye.h:25: error: no matching function for call to ‘cInventory::RemoveItem(cItem)’
source/items/../cInventory.h:35: note: candidates are: bool cInventory::RemoveItem(cItem&)
source/items/Item.cpp: In member function ‘virtual void cItemHandler::PlaceBlock(cWorld*, cPlayer*, cItem*, int, int, int, char)’:
source/items/Item.cpp:240: error: no matching function for call to ‘cInventory::RemoveItem(cItem)’
source/items/../cInventory.h:35: note: candidates are: bool cInventory::RemoveItem(cItem&)
make: *** [build/debug/source/items/Item.o] Error 1
Reply
Thanks given by:


Messages In This Thread
Some refactoring needed? - by Lapayo - 12-26-2011, 02:31 AM
RE: Some refactoring needed? - by mtilden - 12-26-2011, 02:57 AM
RE: Some refactoring needed? - by FakeTruth - 12-26-2011, 02:58 AM
RE: Some refactoring needed? - by Lapayo - 12-26-2011, 03:13 AM
RE: Some refactoring needed? - by FakeTruth - 12-26-2011, 03:34 AM
RE: Some refactoring needed? - by Lapayo - 12-26-2011, 03:35 AM
RE: Some refactoring needed? - by Lapayo - 12-26-2011, 08:52 AM
RE: Some refactoring needed? - by mtilden - 12-26-2011, 04:10 PM
RE: Some refactoring needed? - by mtilden - 12-26-2011, 07:16 PM
RE: Some refactoring needed? - by FakeTruth - 12-26-2011, 10:41 PM
RE: Some refactoring needed? - by Lapayo - 12-27-2011, 12:02 AM
RE: Some refactoring needed? - by mtilden - 12-27-2011, 12:20 AM
RE: Some refactoring needed? - by rs2k - 12-27-2011, 02:42 AM
RE: Some refactoring needed? - by Lapayo - 12-27-2011, 02:46 AM
RE: Some refactoring needed? - by FakeTruth - 12-27-2011, 02:50 AM
RE: Some refactoring needed? - by Lapayo - 12-27-2011, 02:51 AM
RE: Some refactoring needed? - by Lapayo - 07-11-2012, 01:55 AM
RE: Some refactoring needed? - by xoft - 07-11-2012, 02:33 AM
RE: Some refactoring needed? - by Lapayo - 07-16-2012, 06:51 AM
RE: Some refactoring needed? - by xoft - 07-16-2012, 07:07 AM
RE: Some refactoring needed? - by Lapayo - 07-16-2012, 03:11 PM
RE: Some refactoring needed? - by NiLSPACE - 07-16-2012, 06:09 PM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 01:53 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 03:56 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 04:00 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 04:15 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 04:21 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 04:23 AM
RE: Some refactoring needed? - by xoft - 07-17-2012, 04:25 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 04:41 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 04:26 AM
RE: Some refactoring needed? - by xoft - 07-17-2012, 04:48 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 05:40 AM
RE: Some refactoring needed? - by xoft - 07-17-2012, 06:01 PM
RE: Some refactoring needed? - by xoft - 07-17-2012, 10:54 PM
RE: Some refactoring needed? - by Lapayo - 07-18-2012, 12:35 AM



Users browsing this thread: 9 Guest(s)