Browse Source

minor change

Dave Schuyler 22 years ago
parent
commit
a24f21767f

+ 0 - 1
panda/src/collide/collisionHandlerFloor.cxx

@@ -133,7 +133,6 @@ handle_entries() {
             LVecBase3f pos = trans->get_pos();
             pos[2] += adjust;
             def._node->set_transform(trans->set_pos(pos));
-
           } else {
             // Otherwise, go ahead and do the matrix math to do things
             // the old and clumsy way.

+ 3 - 3
panda/src/express/clockObject.I

@@ -228,7 +228,7 @@ get_global_clock() {
 //  Description:
 ////////////////////////////////////////////////////////////////////
 INLINE TimeVal::
-TimeVal(void) {
+TimeVal() {
 }
 
 ////////////////////////////////////////////////////////////////////
@@ -237,7 +237,7 @@ TimeVal(void) {
 //  Description:
 ////////////////////////////////////////////////////////////////////
 INLINE ulong TimeVal::
-get_sec(void) const {
+get_sec() const {
   return tv[0];
 }
 
@@ -247,6 +247,6 @@ get_sec(void) const {
 //  Description:
 ////////////////////////////////////////////////////////////////////
 INLINE ulong TimeVal::
-get_usec(void) const {
+get_usec() const {
   return tv[1];
 }

+ 3 - 3
panda/src/express/clockObject.h

@@ -26,9 +26,9 @@
 
 class EXPCL_PANDAEXPRESS TimeVal {
 PUBLISHED:
-  INLINE TimeVal(void);
-  INLINE ulong get_sec(void) const;
-  INLINE ulong get_usec(void) const;
+  INLINE TimeVal();
+  INLINE ulong get_sec() const;
+  INLINE ulong get_usec() const;
   ulong tv[2];
 };
 

+ 7 - 1
panda/src/physics/linearFrictionForce.I

@@ -22,6 +22,12 @@
 ////////////////////////////////////////////////////////////////////
 INLINE void LinearFrictionForce::
 set_coef(float coef) {
+  // friction shouldn't be outside of [0, 1]
+  if (coef < 0.0f) {
+    coef = 0.0f;
+  } else if (coef > 1.0f) {
+    coef = 1.0f;
+  }
   _coef = coef;
 }
 
@@ -30,6 +36,6 @@ set_coef(float coef) {
 //   Access : public
 ////////////////////////////////////////////////////////////////////
 INLINE float LinearFrictionForce::
-get_coef(void) const {
+get_coef() const {
   return _coef;
 }

+ 6 - 6
panda/src/physics/linearFrictionForce.h

@@ -29,10 +29,10 @@ class EXPCL_PANDAPHYSICS LinearFrictionForce : public LinearForce {
 PUBLISHED:
   LinearFrictionForce(float coef = 1.0f, float a = 1.0f, bool m = false);
   LinearFrictionForce(const LinearFrictionForce &copy);
-  virtual ~LinearFrictionForce(void);
+  virtual ~LinearFrictionForce();
 
   INLINE void set_coef(float coef);
-  INLINE float get_coef(void) const;
+  INLINE float get_coef() const;
   
   virtual void output(ostream &out) const;
   virtual void write(ostream &out, unsigned int indent=0) const;
@@ -40,19 +40,19 @@ PUBLISHED:
 private:
   float _coef;
 
-  virtual LinearForce *make_copy(void);
+  virtual LinearForce *make_copy();
   virtual LVector3f get_child_vector(const PhysicsObject *);
 
 public:
-  static TypeHandle get_class_type(void) {
+  static TypeHandle get_class_type() {
     return _type_handle;
   }
-  static void init_type(void) {
+  static void init_type() {
     LinearForce::init_type();
     register_type(_type_handle, "LinearFrictionForce",
                   LinearForce::get_class_type());
   }
-  virtual TypeHandle get_type(void) const {
+  virtual TypeHandle get_type() const {
     return get_class_type();
   }
   virtual TypeHandle force_init_type() {init_type(); return get_class_type();}

+ 1 - 1
panda/src/physics/physicsObject.cxx

@@ -97,7 +97,7 @@ make_copy() const {
 LMatrix4f PhysicsObject::
 get_lcs() const {
   LMatrix4f m = LMatrix4f::translate_mat(_position);
-  if (_oriented == true) {
+  if (_oriented) {
     m=m*_orientation;
   }
   return m;