Skip to content

Commit b183967

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 39e0d0c commit b183967

File tree

1 file changed

+15
-14
lines changed
  • source/module_basis/module_pw

1 file changed

+15
-14
lines changed

source/module_basis/module_pw/fft.cpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ void FFT::initfft(int nx_in, int ny_in, int nz_in, int lixy_in, int rixy_in, int
7272
this->fftny = this->ny = ny_in;
7373
if (this->gamma_only)
7474
{
75-
if (xprime)
75+
if (xprime) {
7676
this->fftnx = int(nx / 2) + 1;
77-
else
77+
} else {
7878
this->fftny = int(ny / 2) + 1;
79+
}
7980
}
8081
this->nz = nz_in;
8182
this->ns = ns_in;
@@ -353,62 +354,62 @@ void FFT::cleanFFT()
353354
if (planzfor)
354355
{
355356
fftw_destroy_plan(planzfor);
356-
planzfor = NULL;
357+
planzfor = nullptr;
357358
}
358359
if (planzbac)
359360
{
360361
fftw_destroy_plan(planzbac);
361-
planzbac = NULL;
362+
planzbac = nullptr;
362363
}
363364
if (planxfor1)
364365
{
365366
fftw_destroy_plan(planxfor1);
366-
planxfor1 = NULL;
367+
planxfor1 = nullptr;
367368
}
368369
if (planxbac1)
369370
{
370371
fftw_destroy_plan(planxbac1);
371-
planxbac1 = NULL;
372+
planxbac1 = nullptr;
372373
}
373374
if (planxfor2)
374375
{
375376
fftw_destroy_plan(planxfor2);
376-
planxfor2 = NULL;
377+
planxfor2 = nullptr;
377378
}
378379
if (planxbac2)
379380
{
380381
fftw_destroy_plan(planxbac2);
381-
planxbac2 = NULL;
382+
planxbac2 = nullptr;
382383
}
383384
if (planyfor)
384385
{
385386
fftw_destroy_plan(planyfor);
386-
planyfor = NULL;
387+
planyfor = nullptr;
387388
}
388389
if (planybac)
389390
{
390391
fftw_destroy_plan(planybac);
391-
planybac = NULL;
392+
planybac = nullptr;
392393
}
393394
if (planxr2c)
394395
{
395396
fftw_destroy_plan(planxr2c);
396-
planxr2c = NULL;
397+
planxr2c = nullptr;
397398
}
398399
if (planxc2r)
399400
{
400401
fftw_destroy_plan(planxc2r);
401-
planxc2r = NULL;
402+
planxc2r = nullptr;
402403
}
403404
if (planyr2c)
404405
{
405406
fftw_destroy_plan(planyr2c);
406-
planyr2c = NULL;
407+
planyr2c = nullptr;
407408
}
408409
if (planyc2r)
409410
{
410411
fftw_destroy_plan(planyc2r);
411-
planyc2r = NULL;
412+
planyc2r = nullptr;
412413
}
413414

414415
// fftw_destroy_plan(this->plan3dforward);

0 commit comments

Comments
 (0)