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/map.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/map.h') diff --git a/src/map.h b/src/map.h index 0be0e96a3..7fc502793 100644 --- a/src/map.h +++ b/src/map.h @@ -142,11 +142,7 @@ public: Map(std::ostream &dout, IGameDef *gamedef); virtual ~Map(); - - /*virtual u16 nodeContainerId() const - { - return NODECONTAINER_ID_MAP; - }*/ + DISABLE_CLASS_COPY(Map); virtual s32 mapType() const { @@ -344,8 +340,6 @@ private: u32 m_unprocessed_count; u64 m_inc_trending_up_start_time; // milliseconds bool m_queue_size_timer_started; - - DISABLE_CLASS_COPY(Map); }; /* -- cgit v1.2.3