mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02: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:
@@ -49,6 +49,7 @@ public:
|
||||
// Environment will delete the map passed to the constructor
|
||||
Environment(IGameDef *gamedef);
|
||||
virtual ~Environment();
|
||||
DISABLE_CLASS_COPY(Environment);
|
||||
|
||||
/*
|
||||
Step everything in environment.
|
||||
@@ -121,8 +122,6 @@ protected:
|
||||
|
||||
private:
|
||||
std::mutex m_time_lock;
|
||||
|
||||
DISABLE_CLASS_COPY(Environment);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user