From b8b1e3d87e20c6409a281e120a8b0c1b9c01a9dc Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 3 Feb 2006 19:28:53 +0000 Subject: [PATCH] properly cast new operator * return values --- panda/src/linmath/lrotation_src.I | 10 +++++----- panda/src/linmath/lrotation_src.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/panda/src/linmath/lrotation_src.I b/panda/src/linmath/lrotation_src.I index 2f68620343..03613dc5ea 100644 --- a/panda/src/linmath/lrotation_src.I +++ b/panda/src/linmath/lrotation_src.I @@ -31,7 +31,7 @@ FLOATNAME(LRotation)() { // Description: //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation):: -FLOATNAME(LRotation)(const FLOATNAME(LQuaternion)& c) : +FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &c) : FLOATNAME(LQuaternion)(c) { } @@ -99,7 +99,7 @@ FLOATNAME(LRotation)(FLOATTYPE h, FLOATTYPE p, FLOATTYPE r) { //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation):: operator * (FLOATTYPE scalar) const { - return FLOATNAME(LVecBase4)::operator * (scalar); + return FLOATNAME(LRotation)(FLOATNAME(LVecBase4)::operator * (scalar)); } //////////////////////////////////////////////////////////////////// @@ -109,7 +109,7 @@ operator * (FLOATTYPE scalar) const { //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation):: operator / (FLOATTYPE scalar) const { - return FLOATNAME(LVecBase4)::operator / (scalar); + return FLOATNAME(LRotation)(FLOATNAME(LVecBase4)::operator / (scalar)); } //////////////////////////////////////////////////////////////////// @@ -118,7 +118,7 @@ operator / (FLOATTYPE scalar) const { // Description: Rotation * Rotation = Rotation //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LRotation) FLOATNAME(LRotation):: -operator*(const FLOATNAME(LRotation)& other) const { +operator * (const FLOATNAME(LRotation) &other) const { return multiply(other); } @@ -130,7 +130,7 @@ operator*(const FLOATNAME(LRotation)& other) const { // to apply an orientation to a rotation. //////////////////////////////////////////////////////////////////// INLINE_LINMATH FLOATNAME(LQuaternion) FLOATNAME(LRotation):: -operator*(const FLOATNAME(LQuaternion)& other) const { +operator * (const FLOATNAME(LQuaternion) &other) const { nassert_raise("LRotation * LQuaternion is undefined; use LRotation * LRotation or LQuaternion * LQuaternion"); return multiply(other); } diff --git a/panda/src/linmath/lrotation_src.h b/panda/src/linmath/lrotation_src.h index b4f87ffa07..f8b7e1583d 100644 --- a/panda/src/linmath/lrotation_src.h +++ b/panda/src/linmath/lrotation_src.h @@ -23,7 +23,7 @@ class EXPCL_PANDA FLOATNAME(LRotation) : public FLOATNAME(LQuaternion) { PUBLISHED: INLINE_LINMATH FLOATNAME(LRotation)(); - INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion)&); + INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LQuaternion) &); INLINE_LINMATH FLOATNAME(LRotation)(FLOATTYPE, FLOATTYPE, FLOATTYPE, FLOATTYPE); INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LVector3) &, FLOATTYPE); INLINE_LINMATH FLOATNAME(LRotation)(const FLOATNAME(LMatrix3) &); @@ -34,10 +34,10 @@ PUBLISHED: INLINE_LINMATH FLOATNAME(LRotation) operator / (FLOATTYPE scalar) const; INLINE_LINMATH FLOATNAME(LRotation) - operator*(const FLOATNAME(LRotation)& other) const; + operator * (const FLOATNAME(LRotation) &other) const; INLINE_LINMATH FLOATNAME(LQuaternion) - operator*(const FLOATNAME(LQuaternion)& other) const; + operator * (const FLOATNAME(LQuaternion) &other) const; public: static TypeHandle get_class_type() {