-
- Downloads
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.
Showing
- src/basicmacros.h 8 additions, 0 deletionssrc/basicmacros.h
- src/client.h 2 additions, 0 deletionssrc/client.h
- src/emerge.h 2 additions, 0 deletionssrc/emerge.h
- src/environment.h 1 addition, 0 deletionssrc/environment.h
- src/map.h 2 additions, 0 deletionssrc/map.h
- src/mapgen.h 3 additions, 0 deletionssrc/mapgen.h
- src/objdef.h 3 additions, 0 deletionssrc/objdef.h
- src/server.h 2 additions, 0 deletionssrc/server.h
- src/threading/mutex.h 3 additions, 0 deletionssrc/threading/mutex.h
- src/threading/semaphore.h 3 additions, 0 deletionssrc/threading/semaphore.h
- src/threading/thread.h 1 addition, 0 deletionssrc/threading/thread.h
Loading
Please register or sign in to comment