| @@ -252,8 +252,8 @@ private: | |||||
| if (Random::getSystemRandom().nextInt (200) < 4) | if (Random::getSystemRandom().nextInt (200) < 4) | ||||
| { | { | ||||
| BallComponent* ball = new BallComponent (ballGenerator->getBounds().getCentre().toFloat()); | BallComponent* ball = new BallComponent (ballGenerator->getBounds().getCentre().toFloat()); | ||||
| balls.add (ball); | |||||
| addAndMakeVisible (ball); | addAndMakeVisible (ball); | ||||
| balls.add (ball); | |||||
| } | } | ||||
| } | } | ||||
| @@ -251,8 +251,8 @@ private: | |||||
| void closeAllWindows() | void closeAllWindows() | ||||
| { | { | ||||
| for (int i = windows.size(); --i >= 0;) | |||||
| windows.getReference (i).deleteAndZero(); | |||||
| for (int i = 0; i < windows.size(); ++i) | |||||
| windows.getReference(i).deleteAndZero(); | |||||
| windows.clear(); | windows.clear(); | ||||
| } | } | ||||
| @@ -261,8 +261,7 @@ private: | |||||
| { | { | ||||
| String m; | String m; | ||||
| m << "Dialog Windows can be used to quickly show a component, usually blocking mouse input to other windows." | |||||
| << newLine | |||||
| m << "Dialog Windows can be used to quickly show a component, usually blocking mouse input to other windows." << newLine | |||||
| << newLine | << newLine | ||||
| << "They can also be quickly closed with the escape key, try it now."; | << "They can also be quickly closed with the escape key, try it now."; | ||||
| @@ -2629,7 +2629,7 @@ void update_metadata_(const FLAC__StreamEncoder *encoder) | |||||
| b[3] = (FLAC__byte)xx; xx >>= 8; | b[3] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[2] = (FLAC__byte)xx; xx >>= 8; | b[2] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[1] = (FLAC__byte)xx; xx >>= 8; | b[1] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[0] = (FLAC__byte)xx; xx >>= 8; | |||||
| b[0] = (FLAC__byte)xx; //xx >>= 8; | |||||
| xx = encoder->private_->seek_table->points[i].stream_offset; | xx = encoder->private_->seek_table->points[i].stream_offset; | ||||
| b[15] = (FLAC__byte)xx; xx >>= 8; | b[15] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[14] = (FLAC__byte)xx; xx >>= 8; | b[14] = (FLAC__byte)xx; xx >>= 8; | ||||
| @@ -2638,10 +2638,10 @@ void update_metadata_(const FLAC__StreamEncoder *encoder) | |||||
| b[11] = (FLAC__byte)xx; xx >>= 8; | b[11] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[10] = (FLAC__byte)xx; xx >>= 8; | b[10] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[9] = (FLAC__byte)xx; xx >>= 8; | b[9] = (FLAC__byte)xx; xx >>= 8; | ||||
| b[8] = (FLAC__byte)xx; xx >>= 8; | |||||
| b[8] = (FLAC__byte)xx; //xx >>= 8; | |||||
| x = encoder->private_->seek_table->points[i].frame_samples; | x = encoder->private_->seek_table->points[i].frame_samples; | ||||
| b[17] = (FLAC__byte)x; x >>= 8; | b[17] = (FLAC__byte)x; x >>= 8; | ||||
| b[16] = (FLAC__byte)x; x >>= 8; | |||||
| b[16] = (FLAC__byte)x; //x >>= 8; | |||||
| if(encoder->private_->write_callback(encoder, b, 18, 0, 0, encoder->private_->client_data) != FLAC__STREAM_ENCODER_WRITE_STATUS_OK) { | if(encoder->private_->write_callback(encoder, b, 18, 0, 0, encoder->private_->client_data) != FLAC__STREAM_ENCODER_WRITE_STATUS_OK) { | ||||
| encoder->protected_->state = FLAC__STREAM_ENCODER_CLIENT_ERROR; | encoder->protected_->state = FLAC__STREAM_ENCODER_CLIENT_ERROR; | ||||
| return; | return; | ||||
| @@ -467,7 +467,7 @@ void b2Distance(b2DistanceOutput* output, | |||||
| b2Vec2 closestPoint = simplex.GetClosestPoint(); | b2Vec2 closestPoint = simplex.GetClosestPoint(); | ||||
| float32 distanceSqr1 = closestPoint.LengthSquared(); | float32 distanceSqr1 = closestPoint.LengthSquared(); | ||||
| float32 distanceSqr2 = distanceSqr1; | |||||
| float32 distanceSqr2;// = distanceSqr1; | |||||
| // Main iteration loop. | // Main iteration loop. | ||||
| int32 iter = 0; | int32 iter = 0; | ||||
| @@ -477,7 +477,7 @@ void b2ContactSolver::SolveVelocityConstraints() | |||||
| // | // | ||||
| x.x = - cp1->normalMass * b.x; | x.x = - cp1->normalMass * b.x; | ||||
| x.y = 0.0f; | x.y = 0.0f; | ||||
| vn1 = 0.0f; | |||||
| //vn1 = 0.0f; | |||||
| vn2 = vc->K.ex.y * x.x + b.y; | vn2 = vc->K.ex.y * x.x + b.y; | ||||
| if (x.x >= 0.0f && vn2 >= 0.0f) | if (x.x >= 0.0f && vn2 >= 0.0f) | ||||
| @@ -520,7 +520,7 @@ void b2ContactSolver::SolveVelocityConstraints() | |||||
| x.x = 0.0f; | x.x = 0.0f; | ||||
| x.y = - cp2->normalMass * b.y; | x.y = - cp2->normalMass * b.y; | ||||
| vn1 = vc->K.ey.x * x.y + b.x; | vn1 = vc->K.ey.x * x.y + b.x; | ||||
| vn2 = 0.0f; | |||||
| //vn2 = 0.0f; | |||||
| if (x.y >= 0.0f && vn1 >= 0.0f) | if (x.y >= 0.0f && vn1 >= 0.0f) | ||||
| { | { | ||||
| @@ -245,8 +245,8 @@ void b2ContactManager::AddPair(void* proxyUserDataA, void* proxyUserDataB) | |||||
| // Contact creation may swap fixtures. | // Contact creation may swap fixtures. | ||||
| fixtureA = c->GetFixtureA(); | fixtureA = c->GetFixtureA(); | ||||
| fixtureB = c->GetFixtureB(); | fixtureB = c->GetFixtureB(); | ||||
| indexA = c->GetChildIndexA(); | |||||
| indexB = c->GetChildIndexB(); | |||||
| // indexA = c->GetChildIndexA(); | |||||
| // indexB = c->GetChildIndexB(); | |||||
| bodyA = fixtureA->GetBody(); | bodyA = fixtureA->GetBody(); | ||||
| bodyB = fixtureB->GetBody(); | bodyB = fixtureB->GetBody(); | ||||
| @@ -2121,7 +2121,7 @@ public: | |||||
| const ComponentType* operator->() const noexcept { return getComponent(); } | const ComponentType* operator->() const noexcept { return getComponent(); } | ||||
| /** If the component is valid, this deletes it and sets this pointer to null. */ | /** If the component is valid, this deletes it and sets this pointer to null. */ | ||||
| void deleteAndZero() { delete getComponent(); jassert (getComponent() == nullptr); } | |||||
| void deleteAndZero() { delete getComponent(); } | |||||
| bool operator== (ComponentType* component) const noexcept { return weakRef == component; } | bool operator== (ComponentType* component) const noexcept { return weakRef == component; } | ||||
| bool operator!= (ComponentType* component) const noexcept { return weakRef != component; } | bool operator!= (ComponentType* component) const noexcept { return weakRef != component; } | ||||