Fix a lot of warnings and some errors
This commit is contained in:
@@ -27,7 +27,6 @@ namespace Nz
|
||||
|
||||
for (Block& block : m_blocks)
|
||||
{
|
||||
UInt64 alignedOffset = block.freeOffset;
|
||||
if (block.freeOffset + size > m_blockSize)
|
||||
continue; //< Not enough space
|
||||
|
||||
|
||||
@@ -418,7 +418,7 @@ namespace Nz
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->beginFunc = [](cpArbiter* arb, cpSpace* space, void*) -> cpBool
|
||||
handler->beginFunc = [](cpArbiter*, cpSpace*, void*) -> cpBool
|
||||
{
|
||||
return cpTrue;
|
||||
};
|
||||
@@ -444,7 +444,7 @@ namespace Nz
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->separateFunc = [](cpArbiter* arb, cpSpace* space, void*)
|
||||
handler->separateFunc = [](cpArbiter*, cpSpace*, void*)
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -472,7 +472,7 @@ namespace Nz
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->preSolveFunc = [](cpArbiter* arb, cpSpace* space, void* data) -> cpBool
|
||||
handler->preSolveFunc = [](cpArbiter*, cpSpace*, void*) -> cpBool
|
||||
{
|
||||
return cpTrue;
|
||||
};
|
||||
@@ -498,7 +498,7 @@ namespace Nz
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->postSolveFunc = [](cpArbiter* arb, cpSpace* space, void* data)
|
||||
handler->postSolveFunc = [](cpArbiter*, cpSpace*, void*)
|
||||
{
|
||||
};
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace Nz
|
||||
{
|
||||
using CallbackType = decltype(callback);
|
||||
|
||||
auto RealCallback = [](cpBody* body, cpArbiter* arbiter, void* data)
|
||||
auto RealCallback = [](cpBody* /*body*/, cpArbiter* arbiter, void* data)
|
||||
{
|
||||
CallbackType& cb = *static_cast<CallbackType*>(data);
|
||||
|
||||
@@ -399,7 +399,6 @@ namespace Nz
|
||||
|
||||
m_geom->GenerateShapes(this, &m_shapes);
|
||||
|
||||
cpSpace* space = m_world->GetHandle();
|
||||
for (cpShape* shape : m_shapes)
|
||||
cpShapeSetUserData(shape, this);
|
||||
|
||||
@@ -643,7 +642,6 @@ namespace Nz
|
||||
{
|
||||
UnregisterFromSpace();
|
||||
|
||||
cpSpace* space = m_world->GetHandle();
|
||||
for (cpShape* shape : m_shapes)
|
||||
cpShapeFree(shape);
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
namespace Nz
|
||||
{
|
||||
PhysWorld3D::PhysWorld3D() :
|
||||
m_gravity(Vector3f::Zero()),
|
||||
m_maxStepCount(50),
|
||||
m_gravity(Vector3f::Zero()),
|
||||
m_stepSize(0.005f),
|
||||
m_timestepAccumulator(0.f)
|
||||
{
|
||||
@@ -159,7 +159,7 @@ namespace Nz
|
||||
}
|
||||
}
|
||||
|
||||
int PhysWorld3D::OnAABBOverlap(const NewtonJoint* const contactJoint, float timestep, int threadIndex)
|
||||
int PhysWorld3D::OnAABBOverlap(const NewtonJoint* const contactJoint, float /*timestep*/, int /*threadIndex*/)
|
||||
{
|
||||
RigidBody3D* bodyA = static_cast<RigidBody3D*>(NewtonBodyGetUserData(NewtonJointGetBody0(contactJoint)));
|
||||
RigidBody3D* bodyB = static_cast<RigidBody3D*>(NewtonBodyGetUserData(NewtonJointGetBody1(contactJoint)));
|
||||
@@ -186,7 +186,7 @@ namespace Nz
|
||||
return 1;
|
||||
}
|
||||
|
||||
void PhysWorld3D::ProcessContact(const NewtonJoint* const contactJoint, float timestep, int threadIndex)
|
||||
void PhysWorld3D::ProcessContact(const NewtonJoint* const contactJoint, float /*timestep*/, int /*threadIndex*/)
|
||||
{
|
||||
RigidBody3D* bodyA = static_cast<RigidBody3D*>(NewtonBodyGetUserData(NewtonJointGetBody0(contactJoint)));
|
||||
RigidBody3D* bodyB = static_cast<RigidBody3D*>(NewtonBodyGetUserData(NewtonJointGetBody1(contactJoint)));
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Nz
|
||||
|
||||
m_value = Value { resultId };
|
||||
},
|
||||
[this](std::monostate)
|
||||
[](std::monostate)
|
||||
{
|
||||
throw std::runtime_error("an internal error occurred");
|
||||
}
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace Nz
|
||||
{
|
||||
UInt32 resultId = m_writer.AllocateResultId();
|
||||
UInt32 pointerType = m_writer.RegisterPointerType(node.exprType, pointer.storage); //< FIXME
|
||||
UInt32 typeId = m_writer.GetTypeId(node.exprType);
|
||||
|
||||
m_writer.GetInstructions().AppendVariadic(SpirvOp::OpAccessChain, [&](const auto& appender)
|
||||
{
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace Nz
|
||||
for (unsigned int y = 0; y < height; ++y)
|
||||
{
|
||||
for (unsigned int x = 0; x < width; ++x)
|
||||
*pixels++ = (data[x/8] & ((1 << (7 - x%8)) ? 255 : 0));
|
||||
*pixels++ = (data[x/8] & ((1 << (7 - x%8) != 0) ? 255 : 0));
|
||||
|
||||
data += bitmap.pitch;
|
||||
}
|
||||
|
||||
@@ -460,15 +460,15 @@ namespace Nz
|
||||
|
||||
if (!mesh.faces.empty())
|
||||
{
|
||||
const std::string& matKey = matIt.key();
|
||||
mesh.name = meshIt.key();
|
||||
|
||||
const std::string& matName = matIt.key();
|
||||
auto it = materials.find(matName);
|
||||
auto it = materials.find(matKey);
|
||||
if (it == materials.end())
|
||||
{
|
||||
mesh.material = index;
|
||||
materials[matName] = index;
|
||||
m_materials[index] = matName;
|
||||
materials[matKey] = index;
|
||||
m_materials[index] = matKey;
|
||||
}
|
||||
else
|
||||
mesh.material = it->second;
|
||||
|
||||
@@ -263,7 +263,7 @@ namespace Nz
|
||||
DisconnectFontSlots();
|
||||
|
||||
m_blocks = std::move(drawer.m_blocks);
|
||||
m_bounds = std::move(m_bounds);
|
||||
m_bounds = std::move(drawer.m_bounds);
|
||||
m_defaultCharacterSize = std::move(drawer.m_defaultCharacterSize);
|
||||
m_defaultCharacterSpacingOffset = std::move(drawer.m_defaultCharacterSpacingOffset);
|
||||
m_defaultColor = std::move(drawer.m_defaultColor);
|
||||
@@ -272,12 +272,12 @@ namespace Nz
|
||||
m_defaultOutlineColor = std::move(drawer.m_defaultOutlineColor);
|
||||
m_defaultOutlineThickness = std::move(drawer.m_defaultOutlineThickness);
|
||||
m_defaultStyle = std::move(drawer.m_defaultStyle);
|
||||
m_drawPos = std::move(m_drawPos);
|
||||
m_drawPos = std::move(drawer.m_drawPos);
|
||||
m_fontIndexes = std::move(drawer.m_fontIndexes);
|
||||
m_fonts = std::move(drawer.m_fonts);
|
||||
m_glyphs = std::move(m_glyphs);
|
||||
m_lines = std::move(m_lines);
|
||||
m_glyphUpdated = std::move(m_glyphUpdated);
|
||||
m_glyphs = std::move(drawer.m_glyphs);
|
||||
m_lines = std::move(drawer.m_lines);
|
||||
m_glyphUpdated = std::move(drawer.m_glyphUpdated);
|
||||
|
||||
drawer.DisconnectFontSlots();
|
||||
ConnectFontSlots();
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace Ndk
|
||||
* \param id Identifier of the entity
|
||||
*/
|
||||
Entity::Entity(World* world, EntityId id) :
|
||||
m_id(id),
|
||||
m_world(world)
|
||||
m_world(world),
|
||||
m_id(id)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user