Add DISABLE_CLASS_COPY macro (and use it)
authorkwolekr <kwolekr@minetest.net>
Tue, 27 Oct 2015 06:51:43 +0000 (02:51 -0400)
committerkwolekr <kwolekr@minetest.net>
Wed, 28 Oct 2015 02:05:08 +0000 (22:05 -0400)
commitc56d7fe0eba7905b0a63c4a1cfe909988653c23d
treefd5158b3efe0a2f2b48c54afc73f7bcecb1cb9b7
parentca8e56c15a26bc5f3d1dffe5fd39e1ca4b82d6f8
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.
src/basicmacros.h
src/client.h
src/emerge.h
src/environment.h
src/map.h
src/mapgen.h
src/objdef.h
src/server.h
src/threading/mutex.h
src/threading/semaphore.h
src/threading/thread.h