1
0

Fixed a ToLua warning - operator = not supported.

This commit is contained in:
madmaxoft 2014-08-03 11:57:05 +02:00
parent a24e960a89
commit 6ce61d1a6f
8 changed files with 16 additions and 8 deletions

View File

@ -17,7 +17,7 @@ class cBlockIDMap
// Making the map case-insensitive: // Making the map case-insensitive:
struct Comparator struct Comparator
{ {
bool operator()(const AString & a_Item1, const AString & a_Item2) const bool operator ()(const AString & a_Item1, const AString & a_Item2) const
{ {
return (NoCaseCompare(a_Item1, a_Item2) > 0); return (NoCaseCompare(a_Item1, a_Item2) > 0);
} }

View File

@ -24,7 +24,7 @@ static bool DoIntervalsIntersect(int a_Min1, int a_Max1, int a_Min2, int a_Max2)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// cCuboid: // cCuboid:
cCuboid & cCuboid::operator=(cCuboid a_Other) cCuboid & cCuboid::operator =(cCuboid a_Other)
{ {
std::swap(p1, a_Other.p1); std::swap(p1, a_Other.p1);
std::swap(p2, a_Other.p2); std::swap(p2, a_Other.p2);

View File

@ -20,7 +20,11 @@ public:
cCuboid(int a_X1, int a_Y1, int a_Z1) : p1(a_X1, a_Y1, a_Z1), p2(a_X1, a_Y1, a_Z1) {} cCuboid(int a_X1, int a_Y1, int a_Z1) : p1(a_X1, a_Y1, a_Z1), p2(a_X1, a_Y1, a_Z1) {}
cCuboid(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2) : p1(a_X1, a_Y1, a_Z1), p2(a_X2, a_Y2, a_Z2) {} cCuboid(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2) : p1(a_X1, a_Y1, a_Z1), p2(a_X2, a_Y2, a_Z2) {}
cCuboid & operator=(cCuboid a_Other); // tolua_end
cCuboid & operator =(cCuboid a_Other);
// tolua_begin
void Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2); void Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2);
void Assign(const cCuboid & a_SrcCuboid); void Assign(const cCuboid & a_SrcCuboid);

View File

@ -170,7 +170,7 @@ cEntityEffect::cEntityEffect(const cEntityEffect & a_OtherEffect):
cEntityEffect & cEntityEffect::operator=(cEntityEffect a_OtherEffect) cEntityEffect & cEntityEffect::operator =(cEntityEffect a_OtherEffect)
{ {
std::swap(m_Ticks, a_OtherEffect.m_Ticks); std::swap(m_Ticks, a_OtherEffect.m_Ticks);
std::swap(m_Duration, a_OtherEffect.m_Duration); std::swap(m_Duration, a_OtherEffect.m_Duration);

View File

@ -71,7 +71,7 @@ public:
/** Creates an entity effect by copying another /** Creates an entity effect by copying another
@param a_OtherEffect The other effect to copy */ @param a_OtherEffect The other effect to copy */
cEntityEffect & operator=(cEntityEffect a_OtherEffect); cEntityEffect & operator =(cEntityEffect a_OtherEffect);
virtual ~cEntityEffect(void) {} virtual ~cEntityEffect(void) {}

View File

@ -156,11 +156,11 @@ template class SizeChecker<UInt64, 8>;
template class SizeChecker<UInt32, 4>; template class SizeChecker<UInt32, 4>;
template class SizeChecker<UInt16, 2>; template class SizeChecker<UInt16, 2>;
// A macro to disallow the copy constructor and operator= functions // A macro to disallow the copy constructor and operator = functions
// This should be used in the private: declarations for any class that shouldn't allow copying itself // This should be used in the private: declarations for any class that shouldn't allow copying itself
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName &); \ TypeName(const TypeName &); \
void operator=(const TypeName &) void operator =(const TypeName &)
// A macro that is used to mark unused function parameters, to avoid pedantic warnings in gcc // A macro that is used to mark unused function parameters, to avoid pedantic warnings in gcc
#define UNUSED(X) (void)(X) #define UNUSED(X) (void)(X)

View File

@ -34,6 +34,8 @@ public:
{ {
*this = a_Rhs; *this = a_Rhs;
} }
// tolua_end
inline Matrix4 & operator = (const Matrix4 & a_Rhs) inline Matrix4 & operator = (const Matrix4 & a_Rhs)
{ {
@ -43,6 +45,8 @@ public:
} }
return *this; return *this;
} }
// tolua_begin
inline T & operator [] (int a_N) inline T & operator [] (int a_N)
{ {

View File

@ -93,7 +93,7 @@ protected:
sChunkLoad(int a_ChunkX, int a_ChunkY, int a_ChunkZ, bool a_Generate) : m_ChunkX(a_ChunkX), m_ChunkY(a_ChunkY), m_ChunkZ(a_ChunkZ), m_Generate(a_Generate) {} sChunkLoad(int a_ChunkX, int a_ChunkY, int a_ChunkZ, bool a_Generate) : m_ChunkX(a_ChunkX), m_ChunkY(a_ChunkY), m_ChunkZ(a_ChunkZ), m_Generate(a_Generate) {}
bool operator==(const sChunkLoad other) const bool operator ==(const sChunkLoad other) const
{ {
return this->m_ChunkX == other.m_ChunkX && return this->m_ChunkX == other.m_ChunkX &&
this->m_ChunkY == other.m_ChunkY && this->m_ChunkY == other.m_ChunkY &&