Skip to content

Commit b82e5ec

Browse files
committedApr 27, 2017
Don't permit to copy Scripting classes (Client,Server,Mainmenu)
1 parent 1ef9eee commit b82e5ec

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed
 

Diff for: ‎src/script/scripting_client.h

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2424
#include "cpp_api/s_base.h"
2525
#include "cpp_api/s_client.h"
2626
#include "cpp_api/s_security.h"
27+
#include "util/basic_macros.h"
2728

2829
class Client;
2930
class LocalPlayer;
@@ -38,5 +39,6 @@ class ClientScripting:
3839

3940
private:
4041
virtual void InitializeModApi(lua_State *L, int top);
42+
DISABLE_CLASS_COPY(ClientScripting);
4143
};
4244
#endif

Diff for: ‎src/script/scripting_mainmenu.h

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2323
#include "cpp_api/s_base.h"
2424
#include "cpp_api/s_mainmenu.h"
2525
#include "cpp_api/s_async.h"
26+
#include "util/basic_macros.h"
2627

2728
/*****************************************************************************/
2829
/* Scripting <-> Main Menu Interface */
@@ -45,6 +46,7 @@ class MainMenuScripting
4546
void initializeModApi(lua_State *L, int top);
4647

4748
AsyncEngine asyncEngine;
49+
DISABLE_CLASS_COPY(MainMenuScripting);
4850
};
4951

5052

Diff for: ‎src/script/scripting_server.h

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
2828
#include "cpp_api/s_player.h"
2929
#include "cpp_api/s_server.h"
3030
#include "cpp_api/s_security.h"
31+
#include "util/basic_macros.h"
3132

3233
/*****************************************************************************/
3334
/* Scripting <-> Server Game Interface */
@@ -50,6 +51,7 @@ class ServerScripting:
5051

5152
private:
5253
void InitializeModApi(lua_State *L, int top);
54+
DISABLE_CLASS_COPY(ServerScripting);
5355
};
5456

5557
void log_deprecated(const std::string &message);

0 commit comments

Comments
 (0)
Please sign in to comment.