Fixes some unconventional assignment operators, patch by Markus, refs #1852.
Fixes typo in test_ShaderManager This was SVN commit r13420.
This commit is contained in:
parent
94c57085e9
commit
72a8b88b7d
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -93,7 +93,7 @@ public:
|
||||
{
|
||||
CShaderUniforms uniforms1;
|
||||
CShaderUniforms uniforms2;
|
||||
TS_ASSERT(uniforms1 == uniforms1);
|
||||
TS_ASSERT(uniforms1 == uniforms2);
|
||||
|
||||
uniforms1.Add("FOO", CVector4D(1.0f, 0.0f, 0.0f, 0.0f));
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -50,7 +50,7 @@ DrawCalls::DrawCalls(const DrawCalls&)
|
||||
{
|
||||
}
|
||||
|
||||
const DrawCalls& DrawCalls::operator=(const DrawCalls&)
|
||||
DrawCalls& DrawCalls::operator=(const DrawCalls&)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -69,7 +69,7 @@ namespace GUIRenderer
|
||||
DrawCalls();
|
||||
// Copy/assignment results in an empty list, not an actual copy
|
||||
DrawCalls(const DrawCalls&);
|
||||
const DrawCalls& operator=(const DrawCalls&);
|
||||
DrawCalls& operator=(const DrawCalls&);
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -103,12 +103,13 @@ CRect::CRect(const float l, const float t, const float r, const float b) :
|
||||
}
|
||||
|
||||
// =
|
||||
void CRect::operator = (const CRect& a)
|
||||
CRect& CRect::operator = (const CRect& a)
|
||||
{
|
||||
left = a.left;
|
||||
top = a.top;
|
||||
right = a.right;
|
||||
bottom = a.bottom;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ==
|
||||
@ -296,10 +297,11 @@ CPos::CPos(const float &_x, const float &_y) : x(_x), y(_y)
|
||||
}
|
||||
|
||||
// =
|
||||
void CPos::operator = (const CPos& a)
|
||||
CPos& CPos::operator = (const CPos& a)
|
||||
{
|
||||
x = a.x;
|
||||
y = a.y;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ==
|
||||
@ -397,10 +399,11 @@ CSize::CSize(const float &_cx, const float &_cy) : cx(_cx), cy(_cy)
|
||||
}
|
||||
|
||||
// =
|
||||
void CSize::operator = (const CSize& a)
|
||||
CSize& CSize::operator = (const CSize& a)
|
||||
{
|
||||
cx = a.cx;
|
||||
cy = a.cy;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// ==
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2009 Wildfire Games.
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -79,7 +79,7 @@ public:
|
||||
CRect(const float l, const float t, const float r, const float b);
|
||||
|
||||
// Operators
|
||||
void operator = (const CRect& a);
|
||||
CRect& operator = (const CRect& a);
|
||||
bool operator == (const CRect& a) const;
|
||||
bool operator != (const CRect& a) const;
|
||||
CRect operator - (void) const;
|
||||
@ -172,7 +172,7 @@ public:
|
||||
CPos(const float &_x, const float &_y);
|
||||
|
||||
// Operators
|
||||
void operator = (const CPos& a);
|
||||
CPos& operator = (const CPos& a);
|
||||
bool operator == (const CPos& a) const;
|
||||
bool operator != (const CPos& a) const;
|
||||
CPos operator - (void) const;
|
||||
@ -211,7 +211,7 @@ public:
|
||||
CSize(const float &_cx, const float &_cy);
|
||||
|
||||
// Operators
|
||||
void operator = (const CSize& a);
|
||||
CSize& operator = (const CSize& a);
|
||||
bool operator == (const CSize& a) const;
|
||||
bool operator != (const CSize& a) const;
|
||||
CSize operator - (void) const;
|
||||
|
Loading…
Reference in New Issue
Block a user