God I hate CPP

This commit is contained in:
Joshua Coles 2023-02-20 20:48:16 +00:00
parent 7d37960439
commit 9f34807269
2 changed files with 1 additions and 12 deletions

View File

@ -23,14 +23,6 @@ void DLASystem::update() {
}
}
void DLASystem::clearParticles() {
// delete particles and the particle list
for (size_t i = 0; i < this->particleList.size(); i++) {
delete particleList[i];
}
particleList.clear();
}
// set the value of a grid cell for a particular position
// note the position has the initial particle at (0,0)
// but this corresponds to the middle of the grid array ie grid[ halfGrid ][ halfGrid ]
@ -205,7 +197,7 @@ DLASystem::DLASystem(Config config)
// destructor
DLASystem::~DLASystem() {
// delete the particles
clearParticles();
particleList.clear();
if (csv_out.is_open()) {
csv_out.flush();

View File

@ -31,9 +31,6 @@ private:
// list of particles
std::vector<Particle *> particleList;
// delete particles and clear the particle list
void clearParticles();
// size of cluster
double clusterRadius;
// these are related to the DLA algorithm