From 245d1241c98022aaa9b517f93fff84d921fa2457 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 28 Mar 2016 22:36:31 +0200 Subject: [PATCH] Restore assign() for vector classes --- panda/src/linmath/lvecBase2_src.h | 6 +++++- panda/src/linmath/lvecBase3_src.h | 5 +++++ panda/src/linmath/lvecBase4_src.h | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/panda/src/linmath/lvecBase2_src.h b/panda/src/linmath/lvecBase2_src.h index e4c1c8a905..0167855c65 100644 --- a/panda/src/linmath/lvecBase2_src.h +++ b/panda/src/linmath/lvecBase2_src.h @@ -33,9 +33,13 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVecBase2)() DEFAULT_CTOR; INLINE_LINMATH FLOATNAME(LVecBase2)(FLOATTYPE fill_value); INLINE_LINMATH FLOATNAME(LVecBase2)(FLOATTYPE x, FLOATTYPE y); - ALLOC_DELETED_CHAIN(FLOATNAME(LVecBase2)); +#ifdef CPPPARSER + FLOATNAME(LVecBase2) &operator = (const FLOATNAME(LVecBase2) ©) = default; + FLOATNAME(LVecBase2) &operator = (FLOATTYPE fill_value) = default; +#endif + INLINE_LINMATH static const FLOATNAME(LVecBase2) &zero(); INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_x(); INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_y(); diff --git a/panda/src/linmath/lvecBase3_src.h b/panda/src/linmath/lvecBase3_src.h index c1879231b1..fdc39c7819 100644 --- a/panda/src/linmath/lvecBase3_src.h +++ b/panda/src/linmath/lvecBase3_src.h @@ -36,6 +36,11 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVecBase3)(const FLOATNAME(LVecBase2) ©, FLOATTYPE z); ALLOC_DELETED_CHAIN(FLOATNAME(LVecBase3)); +#ifdef CPPPARSER + FLOATNAME(LVecBase3) &operator = (const FLOATNAME(LVecBase3) ©) = default; + FLOATNAME(LVecBase3) &operator = (FLOATTYPE fill_value) = default; +#endif + INLINE_LINMATH static const FLOATNAME(LVecBase3) &zero(); INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_x(); INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_y(); diff --git a/panda/src/linmath/lvecBase4_src.h b/panda/src/linmath/lvecBase4_src.h index 21afc8b182..1d4a16e961 100644 --- a/panda/src/linmath/lvecBase4_src.h +++ b/panda/src/linmath/lvecBase4_src.h @@ -45,6 +45,11 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LVecBase4)(const FLOATNAME(LVector3) &vector); ALLOC_DELETED_CHAIN(FLOATNAME(LVecBase4)); +#ifdef CPPPARSER + FLOATNAME(LVecBase4) &operator = (const FLOATNAME(LVecBase4) ©) = default; + FLOATNAME(LVecBase4) &operator = (FLOATTYPE fill_value) = default; +#endif + INLINE_LINMATH static const FLOATNAME(LVecBase4) &zero(); INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_x(); INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_y();