2
0

bullet-fix-warnings.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. diff --git a/thirdparty/bullet/BulletSoftBody/btSoftBody.h b/thirdparty/bullet/BulletSoftBody/btSoftBody.h
  2. index f578487b8c..dfde8fd1e4 100644
  3. --- a/thirdparty/bullet/BulletSoftBody/btSoftBody.h
  4. +++ b/thirdparty/bullet/BulletSoftBody/btSoftBody.h
  5. @@ -1317,8 +1317,8 @@ public:
  6. }
  7. for (int k = 0; k < m_faceNodeContacts.size(); ++k)
  8. {
  9. - int i = indices[k];
  10. - btSoftBody::DeformableFaceNodeContact& c = m_faceNodeContacts[i];
  11. + int idx = indices[k];
  12. + btSoftBody::DeformableFaceNodeContact& c = m_faceNodeContacts[idx];
  13. btSoftBody::Node* node = c.m_node;
  14. btSoftBody::Face* face = c.m_face;
  15. const btVector3& w = c.m_bary;
  16. diff --git a/thirdparty/bullet/LinearMath/btSerializer.h b/thirdparty/bullet/LinearMath/btSerializer.h
  17. index ce4fc34e20..11592d2ccd 100644
  18. --- a/thirdparty/bullet/LinearMath/btSerializer.h
  19. +++ b/thirdparty/bullet/LinearMath/btSerializer.h
  20. @@ -499,7 +499,6 @@ public:
  21. writeDNA();
  22. //if we didn't pre-allocate a buffer, we need to create a contiguous buffer now
  23. - int mysize = 0;
  24. if (!m_totalSize)
  25. {
  26. if (m_buffer)
  27. @@ -511,14 +510,12 @@ public:
  28. unsigned char* currentPtr = m_buffer;
  29. writeHeader(m_buffer);
  30. currentPtr += BT_HEADER_LENGTH;
  31. - mysize += BT_HEADER_LENGTH;
  32. for (int i = 0; i < m_chunkPtrs.size(); i++)
  33. {
  34. int curLength = sizeof(btChunk) + m_chunkPtrs[i]->m_length;
  35. memcpy(currentPtr, m_chunkPtrs[i], curLength);
  36. btAlignedFree(m_chunkPtrs[i]);
  37. currentPtr += curLength;
  38. - mysize += curLength;
  39. }
  40. }