Skip to content

Commit

Permalink
Don't permit to copy Scripting classes (Client,Server,Mainmenu)
Browse files Browse the repository at this point in the history
  • Loading branch information
nerzhul committed Apr 27, 2017
1 parent 1ef9eee commit b82e5ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/script/scripting_client.h
Expand Up @@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "cpp_api/s_base.h"
#include "cpp_api/s_client.h"
#include "cpp_api/s_security.h"
#include "util/basic_macros.h"

class Client;
class LocalPlayer;
Expand All @@ -38,5 +39,6 @@ class ClientScripting:

private:
virtual void InitializeModApi(lua_State *L, int top);
DISABLE_CLASS_COPY(ClientScripting);
};
#endif
2 changes: 2 additions & 0 deletions src/script/scripting_mainmenu.h
Expand Up @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "cpp_api/s_base.h"
#include "cpp_api/s_mainmenu.h"
#include "cpp_api/s_async.h"
#include "util/basic_macros.h"

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

AsyncEngine asyncEngine;
DISABLE_CLASS_COPY(MainMenuScripting);
};


Expand Down
2 changes: 2 additions & 0 deletions src/script/scripting_server.h
Expand Up @@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "cpp_api/s_player.h"
#include "cpp_api/s_server.h"
#include "cpp_api/s_security.h"
#include "util/basic_macros.h"

/*****************************************************************************/
/* Scripting <-> Server Game Interface */
Expand All @@ -50,6 +51,7 @@ class ServerScripting:

private:
void InitializeModApi(lua_State *L, int top);
DISABLE_CLASS_COPY(ServerScripting);
};

void log_deprecated(const std::string &message);
Expand Down

0 comments on commit b82e5ec

Please sign in to comment.