1
0

Fixed a few clang warnings.

This commit is contained in:
madmaxoft 2014-03-30 20:02:30 +02:00
parent 1bda9b0424
commit a5c0600e6c
4 changed files with 13 additions and 7 deletions

View File

@ -1,8 +1,14 @@
#pragma once #pragma once
/** This interface is used to decouple block handlers from the cPluginManager dependancy through cWorld.
The block handlers call this interface, which is then implemented by the specific classes that
the caller provides.
*/
class cBlockPluginInterface class cBlockPluginInterface
{ {
public: public:
virtual ~cBlockPluginInterface() {}
virtual bool CallHookBlockToPickups(cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) = 0; virtual bool CallHookBlockToPickups(cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) = 0;
}; };

View File

@ -209,7 +209,7 @@ public:
void Add (const cItem & a_Item) {push_back(a_Item); } void Add (const cItem & a_Item) {push_back(a_Item); }
void Delete(int a_Idx); void Delete(int a_Idx);
void Clear (void) {clear(); } void Clear (void) {clear(); }
int Size (void) {return size(); } size_t Size (void) {return size(); }
void Set (int a_Idx, short a_ItemType, char a_ItemCount, short a_ItemDamage); void Set (int a_Idx, short a_ItemType, char a_ItemCount, short a_ItemDamage);
void Add (short a_ItemType, char a_ItemCount, short a_ItemDamage) void Add (short a_ItemType, char a_ItemCount, short a_ItemDamage)

View File

@ -160,14 +160,14 @@ protected:
inline void PropagateLight( inline void PropagateLight(
NIBBLETYPE * a_Light, NIBBLETYPE * a_Light,
int a_SrcIdx, int a_DstIdx, unsigned int a_SrcIdx, unsigned int a_DstIdx,
int & a_NumSeedsOut, unsigned char * a_IsSeedOut, unsigned int * a_SeedIdxOut int & a_NumSeedsOut, unsigned char * a_IsSeedOut, unsigned int * a_SeedIdxOut
) )
{ {
ASSERT(a_SrcIdx >= 0); ASSERT(a_SrcIdx >= 0);
ASSERT(a_SrcIdx < (int)ARRAYCOUNT(m_SkyLight)); ASSERT(a_SrcIdx < ARRAYCOUNT(m_SkyLight));
ASSERT(a_DstIdx >= 0); ASSERT(a_DstIdx >= 0);
ASSERT(a_DstIdx < (int)ARRAYCOUNT(m_BlockTypes)); ASSERT(a_DstIdx < ARRAYCOUNT(m_BlockTypes));
if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx])) if (a_Light[a_SrcIdx] <= a_Light[a_DstIdx] + cBlockInfo::GetSpreadLightFalloff(m_BlockTypes[a_DstIdx]))
{ {

View File

@ -646,9 +646,9 @@ public:
// Various queues length queries (cannot be const, they lock their CS): // Various queues length queries (cannot be const, they lock their CS):
inline int GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export inline int GetGeneratorQueueLength (void) { return m_Generator.GetQueueLength(); } // tolua_export
inline int GetLightingQueueLength (void) { return m_Lighting.GetQueueLength(); } // tolua_export inline size_t GetLightingQueueLength (void) { return m_Lighting.GetQueueLength(); } // tolua_export
inline int GetStorageLoadQueueLength(void) { return m_Storage.GetLoadQueueLength(); } // tolua_export inline size_t GetStorageLoadQueueLength(void) { return m_Storage.GetLoadQueueLength(); } // tolua_export
inline int GetStorageSaveQueueLength(void) { return m_Storage.GetSaveQueueLength(); } // tolua_export inline size_t GetStorageSaveQueueLength(void) { return m_Storage.GetSaveQueueLength(); } // tolua_export
void InitializeSpawn(void); void InitializeSpawn(void);