1
0

Cuboid: added explicit copy assignment operator

This commit is contained in:
archshift
2014-07-20 15:01:15 -07:00
parent b41bd2da5c
commit 8593d48579
2 changed files with 13 additions and 0 deletions

View File

@@ -24,6 +24,17 @@ static bool DoIntervalsIntersect(int a_Min1, int a_Max1, int a_Min2, int a_Max2)
////////////////////////////////////////////////////////////////////////////////
// cCuboid:
cCuboid & cCuboid::operator=(cCuboid a_Other)
{
std::swap(p1, a_Other.p1);
std::swap(p2, a_Other.p2);
return *this;
}
void cCuboid::Assign(int a_X1, int a_Y1, int a_Z1, int a_X2, int a_Y2, int a_Z2)
{
p1.x = a_X1;