diff options
author | Bastien ADAM <Buom01@users.noreply.github.com> | 2017-08-28 11:01:12 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2017-08-28 11:01:12 +0200 |
commit | a5869b3c0909e658ece6a9c27037292ad138b918 (patch) | |
tree | 012aff65c2555a264b1d336bccd8b90828252c67 | |
parent | Implement Forge protocol handshake support (#3869) (diff) | |
download | cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.tar cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.tar.gz cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.tar.bz2 cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.tar.lz cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.tar.xz cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.tar.zst cuberite-a5869b3c0909e658ece6a9c27037292ad138b918.zip |
-rw-r--r-- | src/Cuboid.cpp | 8 | ||||
-rw-r--r-- | src/Cuboid.h | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/Cuboid.cpp b/src/Cuboid.cpp index d87a6ef5e..c638eb636 100644 --- a/src/Cuboid.cpp +++ b/src/Cuboid.cpp @@ -10,8 +10,12 @@ //////////////////////////////////////////////////////////////////////////////// // 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) diff --git a/src/Cuboid.h b/src/Cuboid.h index b39d3ad4a..b9d5f8cfa 100644 --- a/src/Cuboid.h +++ b/src/Cuboid.h @@ -13,9 +13,16 @@ public: Vector3i p1, p2; cCuboid(void) {} + cCuboid(const cCuboid & a_Cuboid) : p1(a_Cuboid.p1), p2(a_Cuboid.p2) {} 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) {} + // tolua_end + + cCuboid & operator =(cCuboid a_Other); + + // tolua_begin + // DEPRECATED, use cCuboid(Vector3i, Vector3i) instead 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) { |