Tell C++11 compilers to generate default copy operator

Recent compilers complain about using memcpy on a class with non-trivial
copy-assignment operator. However, this is used in the the impementation
of that operator. Avoid in C++11 in favor of explicitly asking for the default.
This commit is contained in:
2025-02-06 14:28:41 +01:00
parent ace5da0dfd
commit 8fa17e0f15

View File

@@ -114,7 +114,11 @@ inline void gdd::setStatSevr(aitInt16 stat, aitInt16 sevr)
{ status.s.aitStat = stat; status.s.aitSevr = sevr; }
inline gdd& gdd::operator=(const gdd& v)
#if __cplusplus >= 201103L
= default;
#else
{ memcpy(this,&v,sizeof(gdd)); return *this; }
#endif
inline int gdd::isScalar(void) const { return dimension()==0?1:0; }
inline int gdd::isContainer(void) const