diff options
author | archshift <admin@archshift.com> | 2014-07-21 00:01:15 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-07-21 00:01:15 +0200 |
commit | 8593d485799e04abd8d5a30bed5131f2608a915d (patch) | |
tree | 19b468ebe31037d8398bf0c06e7e0a79fc2fc41d | |
parent | Merge pull request #1213 from mc-server/chat-color (diff) | |
download | cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.tar cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.tar.gz cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.tar.bz2 cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.tar.lz cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.tar.xz cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.tar.zst cuberite-8593d485799e04abd8d5a30bed5131f2608a915d.zip |
-rw-r--r-- | src/Cuboid.cpp | 11 | ||||
-rw-r--r-- | src/Cuboid.h | 2 |
2 files changed, 13 insertions, 0 deletions
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; diff --git a/src/Cuboid.h b/src/Cuboid.h index 960af130b..7bdb21b00 100644 --- a/src/Cuboid.h +++ b/src/Cuboid.h @@ -19,6 +19,8 @@ public: cCuboid(const Vector3i & a_p1, const Vector3i & a_p2) : p1(a_p1), p2(a_p2) {} 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 & operator=(cCuboid a_Other); 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); |