Skip to content

Commit e224f1e

Browse files
committed
Corrected other segmentation faults
1 parent 6f3a6d6 commit e224f1e

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

PhysicalEngine/Scene/Components/PhysicalComponent/Particle/Particle.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ Particle::Particle(const Particle& particle) : Component(particle.m_gameObject)
2525
}
2626

2727
Particle::~Particle() {
28-
for (auto& force : forceGeneratorsList)
29-
{
30-
delete force;
31-
}
28+
// for (auto& force : forceGeneratorsList)
29+
// {
30+
// delete force;
31+
// }
3232
}
3333

3434
void Particle::update(float deltaTime) {

PhysicalEngine/Scene/Components/PhysicalComponent/PhysicalComponent.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
#include <imgui/imgui.h>
66

77
PhysicalComponent::~PhysicalComponent() {
8-
// for (auto& forceGenerator : forceGeneratorsList)
9-
// {
10-
// delete forceGenerator;
11-
// }
8+
for (auto& forceGenerator : forceGeneratorsList)
9+
{
10+
delete forceGenerator;
11+
}
1212
}
1313

1414
float PhysicalComponent::distance(const PhysicalComponent& p) {

PhysicalEngine/Scene/Components/PhysicalComponent/Rigidbody/Rigidbody.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ Rigidbody::Rigidbody(GameObject* gameObject) : Component(gameObject) {
2626
}
2727

2828
Rigidbody::~Rigidbody() {
29-
for (ForceGenerator* forceGenerator : forceGeneratorsList)
30-
{
31-
delete forceGenerator;
32-
}
29+
// for (ForceGenerator* forceGenerator : forceGeneratorsList)
30+
// {
31+
// delete forceGenerator;
32+
// }
3333
for (ForcePoint& forcePoint : pointForceGeneratorsList)
3434
{
3535
delete forcePoint.force;

0 commit comments

Comments
 (0)