1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Avoided some pedantic GCC warnings.

This commit is contained in:
jules 2013-11-03 19:16:52 +00:00
parent 664a585d19
commit 12a8dd3092
65 changed files with 595 additions and 614 deletions

View file

@ -108,7 +108,7 @@ b2PrismaticJoint::b2PrismaticJoint(const b2PrismaticJointDef* def)
m_referenceAngle = def->referenceAngle;
m_impulse.SetZero();
m_motorMass = 0.0;
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_lowerTranslation = def->lowerTranslation;

View file

@ -55,7 +55,7 @@ b2WheelJoint::b2WheelJoint(const b2WheelJointDef* def)
m_mass = 0.0f;
m_impulse = 0.0f;
m_motorMass = 0.0;
m_motorMass = 0.0f;
m_motorImpulse = 0.0f;
m_springMass = 0.0f;
m_springImpulse = 0.0f;
@ -141,14 +141,14 @@ void b2WheelJoint::InitVelocityConstraints(const b2SolverData& data)
float32 omega = 2.0f * b2_pi * m_frequencyHz;
// Damping coefficient
float32 d = 2.0f * m_springMass * m_dampingRatio * omega;
float32 damp = 2.0f * m_springMass * m_dampingRatio * omega;
// Spring stiffness
float32 k = m_springMass * omega * omega;
// magic formulas
float32 h = data.step.dt;
m_gamma = h * (d + h * k);
m_gamma = h * (damp + h * k);
if (m_gamma > 0.0f)
{
m_gamma = 1.0f / m_gamma;

View file

@ -307,7 +307,7 @@ void b2Island::Solve(b2Profile* profile, const b2TimeStep& step, const b2Vec2& g
// Solve position constraints
timer.Reset();
bool positionSolved = false;
for (int32 i = 0; i < step.positionIterations; ++i)
for (int32 j = 0; j < step.positionIterations; ++j)
{
bool contactsOkay = contactSolver.SolvePositionConstraints();