[Bf-committers] PATCH - latest CVS broken w/ MSVC 2003

Early Ehlinger early at respower.com
Fri Mar 2 22:04:48 CET 2007


In PHY_Ode project 
(source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp), void 
ODEPhysicsEnvironment::removeConstraint(int constraintid) is 
implemented, although in the corresponding header, this function takes a 
void*.

The function casts constraintid to type dJointID, which is defined in 
extern/ode/dist/include/ode/common.h as typedef struct dxJoint *dJointID;

This implies that the header and not the .cpp file is correct - 
removeConstraint should take a pointer rather than an int.  This patch 
codifies that research, although to be honest, I don't know much about 
the physics engine's internals, so hopefully somebody who knows more 
than syntactically what's going on can verify that this is the right call.

My big concern at the moment is getting to the point where I can do a 
cvs checkout and be assured that the code I get will compile.

-- Early Ehlinger, President, ResPower, Inc.




-------------- next part --------------
Index: source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp,v
retrieving revision 1.8
diff -b -u -r1.8 OdePhysicsEnvironment.cpp
--- source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp	29 Jan 2006 15:15:34 -0000	1.8
+++ source/gameengine/Physics/BlOde/OdePhysicsEnvironment.cpp	2 Mar 2007 21:51:26 -0000
@@ -198,7 +198,7 @@
 
 }
 
-void		ODEPhysicsEnvironment::removeConstraint(int constraintid)
+void		ODEPhysicsEnvironment::removeConstraint(void* constraintid)
 {
 	if (constraintid)
 	{


More information about the Bf-committers mailing list