Browse Source

compile errors

David Rose 18 years ago
parent
commit
0284746bc2

+ 4 - 13
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;
 }
 
 

+ 1 - 0
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;

+ 2 - 3
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;

+ 2 - 1
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);