From ab128e03ff555a8fc292352b0b21fc1075a4c008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= 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/server.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server.h') diff --git a/src/server.h b/src/server.h index 5236851fe..56706bc61 100644 --- a/src/server.h +++ b/src/server.h @@ -155,6 +155,8 @@ public: ChatInterface *iface = NULL ); ~Server(); + DISABLE_CLASS_COPY(Server); + void start(Address bind_addr); void stop(); // This is mainly a way to pass the time to the server. @@ -671,8 +673,6 @@ private: std::unordered_map m_mod_storages; float m_mod_storage_save_timer; - - DISABLE_CLASS_COPY(Server); }; /* -- cgit v1.2.3