Make clang-tidy a little happier
This commit is contained in:
parent
9f34807269
commit
56d8007d46
@ -38,7 +38,7 @@ int DLASystem::readGrid(std::array<double, 2> pos) {
|
||||
// add a particle to the system at a specific position
|
||||
void DLASystem::addParticle(std::array<double, 2> pos) {
|
||||
// create a new particle
|
||||
Particle *p = new Particle(pos);
|
||||
auto *p = new Particle(pos);
|
||||
// push_back means "add this to the end of the list"
|
||||
particleList.push_back(p);
|
||||
|
||||
@ -144,7 +144,7 @@ int DLASystem::checkStick() {
|
||||
int result = 0;
|
||||
// loop over neighbours
|
||||
for (int i = 0; i < 4; i++) {
|
||||
std::array<double, 2> checkpos;
|
||||
std::array<double, 2> checkpos{};
|
||||
setPosNeighbour(checkpos, lastP->pos, i);
|
||||
// if the neighbour is occupied...
|
||||
if (readGrid(checkpos) == 1)
|
||||
@ -169,14 +169,6 @@ DLASystem::DLASystem(Config config)
|
||||
/*
|
||||
* Handle grid data structure.
|
||||
* */
|
||||
|
||||
// // set the grid to zero
|
||||
// for (int i = 0; i < gridSize; i++) {
|
||||
// for (int j = 0; j < gridSize; j++) {
|
||||
// grid[i][j] = 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
// Add particle to the centre of the grid to start
|
||||
std::array<double, 2> pos{0.0, 0.0};
|
||||
addParticle(pos);
|
||||
|
||||
@ -2,12 +2,12 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
|
||||
#define _USE_MATH_DEFINES
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
@ -81,7 +81,7 @@ public:
|
||||
int lastParticleIsActive;
|
||||
|
||||
// constructor
|
||||
DLASystem(Config config);
|
||||
explicit DLASystem(Config config);
|
||||
|
||||
// destructor
|
||||
~DLASystem();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user