aboutsummaryrefslogtreecommitdiff
path: root/Source/Initialization/PlasmaInjector.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2023-03-23 18:09:24 +0100
committerGravatar GitHub <noreply@github.com> 2023-03-23 10:09:24 -0700
commitd5c7d5484fb4e8012f8f9a46ff8ee6c6dac427eb (patch)
tree608ecffad8f9737912c8ff1871c1f0d1ce20e632 /Source/Initialization/PlasmaInjector.cpp
parent1d7e72f2e2e37cf7f2b9ca4910e29a0729c35aff (diff)
downloadWarpX-d5c7d5484fb4e8012f8f9a46ff8ee6c6dac427eb.tar.gz
WarpX-d5c7d5484fb4e8012f8f9a46ff8ee6c6dac427eb.tar.zst
WarpX-d5c7d5484fb4e8012f8f9a46ff8ee6c6dac427eb.zip
fix modernize use equals default check by clang tidy (#3775)
Diffstat (limited to 'Source/Initialization/PlasmaInjector.cpp')
-rw-r--r--Source/Initialization/PlasmaInjector.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Initialization/PlasmaInjector.cpp b/Source/Initialization/PlasmaInjector.cpp
index eeb700ae1..4c2aebf8e 100644
--- a/Source/Initialization/PlasmaInjector.cpp
+++ b/Source/Initialization/PlasmaInjector.cpp
@@ -512,9 +512,9 @@ PlasmaInjector::PlasmaInjector (int ispecies, const std::string& name)
amrex::Gpu::synchronize();
}
+#ifdef AMREX_USE_GPU
PlasmaInjector::~PlasmaInjector ()
{
-#ifdef AMREX_USE_GPU
if (d_inj_pos) {
amrex::The_Arena()->free(d_inj_pos);
}
@@ -524,8 +524,10 @@ PlasmaInjector::~PlasmaInjector ()
if (d_inj_mom) {
amrex::The_Arena()->free(d_inj_mom);
}
-#endif
}
+#else
+PlasmaInjector::~PlasmaInjector () = default;
+#endif
// Depending on injection type at runtime, initialize inj_rho
// so that inj_rho->getDensity calls