Macro to disable the copy-constructor.
Another toolkit I use has an explicit macro for this, which is nice for readability, so I've borrowed it here.
This commit is contained in:
parent
89d30acbc5
commit
dc463d1c2c
@ -103,4 +103,10 @@ inline void SG_NORMALIZE_RANGE( T &val, const T min, const T max ) {
|
|||||||
// avoid an 'unused parameter' compiler warning.
|
// avoid an 'unused parameter' compiler warning.
|
||||||
#define SG_UNUSED(x) (void)x
|
#define SG_UNUSED(x) (void)x
|
||||||
|
|
||||||
|
// easy way to disable the copy constructor and assignment operator
|
||||||
|
// on an object
|
||||||
|
#define SG_DISABLE_COPY(Class) \
|
||||||
|
Class(const Class &); \
|
||||||
|
Class &operator=(const Class &);
|
||||||
|
|
||||||
#endif // _SG_INLINES_H
|
#endif // _SG_INLINES_H
|
||||||
|
Loading…
Reference in New Issue
Block a user