From 8593d485799e04abd8d5a30bed5131f2608a915d Mon Sep 17 00:00:00 2001 From: archshift Date: Sun, 20 Jul 2014 15:01:15 -0700 Subject: Cuboid: added explicit copy assignment operator --- src/Cuboid.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Cuboid.cpp') diff --git a/src/Cuboid.cpp b/src/Cuboid.cpp index d97447412..26e86c77b 100644 --- a/src/Cuboid.cpp +++ b/src/Cuboid.cpp @@ -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; -- cgit v1.2.3