diff --git a/Demos/AllBulletDemos/CMakeLists.txt b/Demos/AllBulletDemos/CMakeLists.txt index c308ac680..177795421 100644 --- a/Demos/AllBulletDemos/CMakeLists.txt +++ b/Demos/AllBulletDemos/CMakeLists.txt @@ -86,7 +86,7 @@ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) ADD_CUSTOM_COMMAND( TARGET AppAllBulletDemos POST_BUILD - COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/testFileOriginal.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile32Single.bullet + COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/SerializeDemo/testFile.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile.bullet COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR} ) ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) diff --git a/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp b/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp index 9c7a3fa86..9e10654ba 100644 --- a/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp +++ b/Demos/ConcaveConvexcastDemo/ConcaveConvexcastDemo.cpp @@ -118,15 +118,14 @@ public: this->min_y = min_y; this->max_y = max_y; sign = 1.0; - btScalar dalpha = 2*SIMD_2_PI/NUMRAYS_IN_BAR; + btScalar dalpha = btScalar(2)*SIMD_2_PI/btScalar(NUMRAYS_IN_BAR); for (int i = 0; i < NUMRAYS_IN_BAR; i++) { - btScalar alpha = dalpha * i; + btScalar alpha = dalpha * btScalar(i); // rotate around by alpha degrees y btTransform tr(btQuaternion(btVector3(0.0, 1.0, 0.0), alpha)); direction[i] = btVector3(1.0, 0.0, 0.0); direction[i] = tr * direction[i]; - direction[i] = direction[i]; source[i] = btVector3(min_x, max_y, z); dest[i] = source[i] + direction[i] * ray_length; dest[i][1] = min_y; diff --git a/Demos/ConcaveRaycastDemo/ConcaveRaycastDemo.cpp b/Demos/ConcaveRaycastDemo/ConcaveRaycastDemo.cpp index 226306d1b..e4c0dff13 100644 --- a/Demos/ConcaveRaycastDemo/ConcaveRaycastDemo.cpp +++ b/Demos/ConcaveRaycastDemo/ConcaveRaycastDemo.cpp @@ -100,7 +100,7 @@ public: btScalar dalpha = 2*SIMD_2_PI/NUMRAYS_IN_BAR; for (int i = 0; i < NUMRAYS_IN_BAR; i++) { - btScalar z = (max_z-min_z)/NUMRAYS_IN_BAR * i + min_z; + btScalar z = (max_z-min_z)/btScalar(NUMRAYS_IN_BAR) * btScalar(i) + min_z; source[i] = btVector3(min_x, max_y, z); dest[i] = btVector3(min_x + ray_length, min_y, z); normal[i] = btVector3(1.0, 0.0, 0.0); diff --git a/Demos/ConvexDecompositionDemo/CMakeLists.txt b/Demos/ConvexDecompositionDemo/CMakeLists.txt index 34547f85f..cc3b788c2 100644 --- a/Demos/ConvexDecompositionDemo/CMakeLists.txt +++ b/Demos/ConvexDecompositionDemo/CMakeLists.txt @@ -68,7 +68,7 @@ IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) ADD_CUSTOM_COMMAND( TARGET AppConvexDecompositionDemo POST_BUILD - COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/testFileOriginal.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile32Single.bullet + COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/Demos/SerializeDemo/testFile.bullet ${CMAKE_CURRENT_BINARY_DIR}/testFile.bullet COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/file.obj ${CMAKE_CURRENT_BINARY_DIR} ) ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) @@ -79,4 +79,4 @@ IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) SET_TARGET_PROPERTIES(AppConvexDecompositionDemo PROPERTIES DEBUG_POSTFIX "_Debug") SET_TARGET_PROPERTIES(AppConvexDecompositionDemo PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel") SET_TARGET_PROPERTIES(AppConvexDecompositionDemo PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo") -ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) \ No newline at end of file +ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) diff --git a/Extras/ConvexDecomposition/bestfitobb.cpp b/Extras/ConvexDecomposition/bestfitobb.cpp index 6e8057b05..6b31d1d40 100644 --- a/Extras/ConvexDecomposition/bestfitobb.cpp +++ b/Extras/ConvexDecomposition/bestfitobb.cpp @@ -106,7 +106,7 @@ void computeBestFitOBB(unsigned int vcount,const float *points,unsigned int pstr float steps = 8.0f; // 16 steps on each axis. float bestVolume = 1e9; - float angle[3]; + float angle[3]={0.f,0.f,0.f}; while ( sweep >= 1 ) { diff --git a/Extras/Serialize/BulletFileLoader/bFile.cpp b/Extras/Serialize/BulletFileLoader/bFile.cpp index 49e95c2e6..b41729256 100644 --- a/Extras/Serialize/BulletFileLoader/bFile.cpp +++ b/Extras/Serialize/BulletFileLoader/bFile.cpp @@ -1058,7 +1058,8 @@ void bFile::writeChunks(FILE* fp, bool fixupPointers) - short int* curStruct1 = mMemoryDNA->getStruct(dataChunk.dna_nr); + short int* curStruct1; + curStruct1 = mMemoryDNA->getStruct(dataChunk.dna_nr); assert(curStruct1 == curStruct); char* cur = fixupPointers ? (char*)findLibPointer(dataChunk.oldPtr) : (char*)dataChunk.oldPtr; diff --git a/Extras/Serialize/BulletFileLoader/btBulletFile.cpp b/Extras/Serialize/BulletFileLoader/btBulletFile.cpp index 3a62e0e50..6ab02620f 100644 --- a/Extras/Serialize/BulletFileLoader/btBulletFile.cpp +++ b/Extras/Serialize/BulletFileLoader/btBulletFile.cpp @@ -364,7 +364,8 @@ void btBulletFile::addStruct(const char* structType,void* data, int len, void* o ///Perform structure size validation short* structInfo= mMemoryDNA->getStruct(dataChunk.dna_nr); - int elemBytes = mMemoryDNA->getLength(structInfo[0]); + int elemBytes; + elemBytes= mMemoryDNA->getLength(structInfo[0]); // int elemBytes = mMemoryDNA->getElementSize(structInfo[0],structInfo[1]); assert(len==elemBytes);