mirror of
https://github.com/bulletphysics/bullet3.git
synced 2026-10-02 15:05:33 +00:00
Compilation warning fixes:
* new btSdfCollisionShapeInternalData() may not be allocated aligned 16 * Two cases of signed/unsigned mismatch
This commit is contained in:
@@ -2,8 +2,11 @@
|
||||
#include "btMiniSDF.h"
|
||||
#include "LinearMath/btAabbUtil2.h"
|
||||
|
||||
struct btSdfCollisionShapeInternalData
|
||||
ATTRIBUTE_ALIGNED16(struct)
|
||||
btSdfCollisionShapeInternalData
|
||||
{
|
||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
|
||||
btVector3 m_localScaling;
|
||||
btScalar m_margin;
|
||||
btMiniSDF m_sdf;
|
||||
|
||||
@@ -852,7 +852,7 @@ static void setupSpatialGridBatchesMt(
|
||||
memHelper.addChunk((void**)&constraintRowBatchIds, sizeof(int) * numConstraintRows);
|
||||
size_t scratchSize = memHelper.getSizeToAllocate();
|
||||
// if we need to reallocate
|
||||
if (scratchMemory->capacity() < scratchSize)
|
||||
if (static_cast<size_t>(scratchMemory->capacity()) < scratchSize)
|
||||
{
|
||||
// allocate 6.25% extra to avoid repeated reallocs
|
||||
scratchMemory->reserve(scratchSize + scratchSize / 16);
|
||||
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
std::sort(tuples.begin(), tuples.end());
|
||||
btAlignedObjectArray<int> new_indices;
|
||||
btAlignedObjectArray<btVector3> new_vecs;
|
||||
for (int i = 0; i < tuples.size(); ++i)
|
||||
for (size_t i = 0; i < tuples.size(); ++i)
|
||||
{
|
||||
new_indices.push_back(tuples[i].b);
|
||||
new_vecs.push_back(m_vecs[tuples[i].a]);
|
||||
|
||||
Reference in New Issue
Block a user