mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Add DISABLE_CLASS_COPY macro (and use it)
Use this macro to disallow copying of an object using the assignment operator or copy constructor. This catches otherwise silent-but-deadly mistakes such as "ServerMap map = env->getMap();" at compile time. If so desired, it is still possible to copy a class, but it now requires an explicit call to memcpy or std::copy.
This commit is contained in:
parent
ca8e56c15a
commit
c56d7fe0eb
11 changed files with 30 additions and 0 deletions
|
@ -365,6 +365,8 @@ private:
|
|||
u32 m_unprocessed_count;
|
||||
u32 m_inc_trending_up_start_time; // milliseconds
|
||||
bool m_queue_size_timer_started;
|
||||
|
||||
DISABLE_CLASS_COPY(Map);
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue