clang-tidy nullptr

This commit is contained in:
Erik Frojdh
2020-03-10 15:06:51 +01:00
parent ee799b540a
commit d818e2570f
9 changed files with 41 additions and 42 deletions

View File

@ -104,8 +104,8 @@ void SlsQt2DPlot::SetupColorMap() {
void SlsQt2DPlot::FillTestPlot(int mode) {
static int nx = 50;
static int ny = 50;
static double *the_data = 0;
if (the_data == 0)
static double *the_data = nullptr;
if (the_data == nullptr)
the_data = new double[nx * ny];
double dmax = sqrt(pow(nx / 2.0 - 0.5, 2) + pow(ny / 2.0 - 0.5, 2));