diff --git a/source/graphics/tests/test_ShaderManager.h b/source/graphics/tests/test_ShaderManager.h index 73f1236a82..1feef552e9 100644 --- a/source/graphics/tests/test_ShaderManager.h +++ b/source/graphics/tests/test_ShaderManager.h @@ -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)); diff --git a/source/gui/GUIRenderer.cpp b/source/gui/GUIRenderer.cpp index 8c1016c408..84ac5f4d57 100644 --- a/source/gui/GUIRenderer.cpp +++ b/source/gui/GUIRenderer.cpp @@ -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; } diff --git a/source/gui/GUIRenderer.h b/source/gui/GUIRenderer.h index bb228ec1bf..a99cc2e25f 100644 --- a/source/gui/GUIRenderer.h +++ b/source/gui/GUIRenderer.h @@ -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&); }; } diff --git a/source/ps/Overlay.cpp b/source/ps/Overlay.cpp index dae01025a3..c9b2449f07 100644 --- a/source/ps/Overlay.cpp +++ b/source/ps/Overlay.cpp @@ -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; } // == diff --git a/source/ps/Overlay.h b/source/ps/Overlay.h index d4ed860ea2..e0bb1929bb 100644 --- a/source/ps/Overlay.h +++ b/source/ps/Overlay.h @@ -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;