X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fsg_inlines.h;h=f10090db99068a1684e74d409df110ffcec31d58;hb=38ddfab1e0d7c0bd0ef6d2de7c2487510fc9e700;hp=399c4bc1ebd86d17a8172f183db639782f19af79;hpb=82588b0daff447f873e57442c85f2f99b7c0ae87;p=simgear.git diff --git a/simgear/sg_inlines.h b/simgear/sg_inlines.h index 399c4bc1..f10090db 100644 --- a/simgear/sg_inlines.h +++ b/simgear/sg_inlines.h @@ -100,4 +100,13 @@ inline void SG_NORMALIZE_RANGE( T &val, const T min, const T max ) { while( val < min ) val += step; } +// avoid an 'unused parameter' compiler warning. +#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