From 0284746bc21d0ae400ddef88cc5b283b7aa24e94 Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 31 May 2007 23:54:36 +0000 Subject: [PATCH] compile errors --- panda/src/chan/animGroup.cxx | 17 ++++------------- panda/src/chan/animGroup.h | 1 + panda/src/chan/partBundle.I | 5 ++--- panda/src/chan/partBundle.h | 3 ++- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/panda/src/chan/animGroup.cxx b/panda/src/chan/animGroup.cxx index 51b45930cd..8ff4e657c4 100644 --- a/panda/src/chan/animGroup.cxx +++ b/panda/src/chan/animGroup.cxx @@ -242,11 +242,9 @@ make_child_dynamic(const string &name) { // This may be called before binding the animation to a // character to replace certain joints with // frozen ones. -// -// Returns NULL if the named child cannot be found. //////////////////////////////////////////////////////////////////// void AnimGroup:: -void make_child_fixed(const string &name, const LMatrix4f &mat) { +make_child_fixed(const string &name, const LMatrix4f &mat) { Children::iterator ci; for (ci = _children.begin(); ci != _children.end(); ++ci) { AnimGroup *child = (*ci); @@ -256,13 +254,13 @@ void make_child_fixed(const string &name, const LMatrix4f &mat) { if (child->is_of_type(AnimChannelMatrix::get_class_type())) { AnimChannelMatrix *mchild = DCAST(AnimChannelMatrix, child); AnimChannelMatrixFixed *new_mchild = - new AnimChannelMatrixFixed(this, name, mat); + new AnimChannelMatrixFixed(name, mat); new_child = new_mchild; } if (new_child != (AnimGroup *)NULL) { new_child->_children.swap(child->_children); - nassertr(_children.back() == new_child, NULL); + nassertv(_children.back() == new_child); // The new child was appended to the end of our children list // by its constructor. Reposition it to replace the original @@ -291,17 +289,10 @@ void make_child_fixed(const string &name, const LMatrix4f &mat) { } new_children.swap(_children); } - - return new_child; } } - AnimGroup *result = child->make_child_fixed(name, mat); - if (result != (AnimGroup *)NULL) { - return result; - } + child->make_child_fixed(name, mat); } - - return (AnimGroup *)NULL; } diff --git a/panda/src/chan/animGroup.h b/panda/src/chan/animGroup.h index bed59271e6..7d3d0eee8e 100644 --- a/panda/src/chan/animGroup.h +++ b/panda/src/chan/animGroup.h @@ -24,6 +24,7 @@ #include "typedWritableReferenceCount.h" #include "pointerTo.h" #include "namable.h" +#include "luse.h" class AnimBundle; class BamReader; diff --git a/panda/src/chan/partBundle.I b/panda/src/chan/partBundle.I index ebbc3b8954..06888a6832 100644 --- a/panda/src/chan/partBundle.I +++ b/panda/src/chan/partBundle.I @@ -209,12 +209,11 @@ get_control_effect(AnimControl *control) const { //////////////////////////////////////////////////////////////////// // Function: PartBundle::freeze_joint -// Access: Protected +// Access: Published // Description: stores away a joint freeze for bind time //////////////////////////////////////////////////////////////////// INLINE void PartBundle:: -freeze_joint(string jointName, LMatrix4f transform) const -{ +freeze_joint(const string &jointName, const LMatrix4f &transform) { JointTransform jt; jt.name=jointName; jt.transform=transform; diff --git a/panda/src/chan/partBundle.h b/panda/src/chan/partBundle.h index 1c083540b8..e6e412d0d5 100644 --- a/panda/src/chan/partBundle.h +++ b/panda/src/chan/partBundle.h @@ -109,7 +109,8 @@ PUBLISHED: INLINE int get_num_nodes() const; INLINE PartBundleNode *get_node(int n) const; - INLINE void freeze_joint(string jointName, LMatrix4f transform) const; + INLINE void freeze_joint(const string &jointName, + const LMatrix4f &transform); void clear_control_effects(); INLINE void set_control_effect(AnimControl *control, float effect);