From ab128e03ff555a8fc292352b0b21fc1075a4c008 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 10 Jun 2017 13:49:15 +0200 Subject: C++11 patchset 6: forbid object copy using assigment/copy function deleters (#5945) C++11 implement function deleting, it's generally used to prevent some object copy In script API use this function removal on ScriptApiBase instead of ScriptApiClient/Server/MainMenu, this affect all ScriptApis Move DISABLE_CLASS_COPY with constructor, the deleted function permit to replace function in its original place --- src/mapgen.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mapgen.h') diff --git a/src/mapgen.h b/src/mapgen.h index 222838011..f5f21388c 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -192,6 +192,7 @@ public: Mapgen(); Mapgen(int mapgenid, MapgenParams *params, EmergeManager *emerge); virtual ~Mapgen(); + DISABLE_CLASS_COPY(Mapgen); virtual MapgenType getType() const { return MAPGEN_INVALID; } @@ -233,7 +234,6 @@ private: // that checks whether there are floodable nodes without liquid beneath // the node at index vi. inline bool isLiquidHorizontallyFlowable(u32 vi, v3s16 em); - DISABLE_CLASS_COPY(Mapgen); }; /* -- cgit v1.2.3