1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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
This commit is contained in:
Loïc Blot 2017-06-10 13:49:15 +02:00 committed by GitHub
parent 9c497aa71f
commit ab128e03ff
12 changed files with 13 additions and 28 deletions

View file

@ -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);
};
/*