From 0e149acc6265c0d570c814d44f86064eddc4ed12 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sun, 26 Apr 2015 03:24:25 +1000 Subject: [PATCH] Pointless tweak --- common/map/region.cpp | 8 ++++++++ common/map/region.hpp | 1 + 2 files changed, 9 insertions(+) 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);