diff --git a/common/map/region.cpp b/common/map/region.cpp index 8a7f671..cf59b3f 100644 --- a/common/map/region.cpp +++ b/common/map/region.cpp @@ -42,6 +42,14 @@ Region::Region(Region const& rhs): x(rhs.x), y(rhs.y) { memcpy(tiles, rhs.tiles, REGION_WIDTH*REGION_HEIGHT*REGION_DEPTH*sizeof(type_t)); solid = rhs.solid; + //debugging + std::cout << "Copied: (" << x << ", " << y << "): " << int(***tiles) << ", " << int(***rhs.tiles) << std::endl; +} + +Region::Region(Region&& rhs): x(rhs.x), y(rhs.y) { + memcpy(tiles, rhs.tiles, REGION_WIDTH*REGION_HEIGHT*REGION_DEPTH*sizeof(type_t)); + solid = rhs.solid; + //debugging std::cout << "Moved: (" << x << ", " << y << "): " << int(***tiles) << ", " << int(***rhs.tiles) << std::endl; } diff --git a/common/map/region.hpp b/common/map/region.hpp index fd8c461..0b48b13 100644 --- a/common/map/region.hpp +++ b/common/map/region.hpp @@ -39,6 +39,7 @@ public: Region() = delete; Region(int x, int y); Region(Region const&); + Region(Region&&); ~Region() = default; type_t SetTile(int x, int y, int z, type_t v);