From e1808e6894519a68449a596d77db706d85d5aca0 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Tue, 10 May 2022 00:11:11 +0200 Subject: Fix miscellaneous issues found with clang tidy (#3083) * fix miscellaneous issues found with clang tidy * fix miscellaneous issues found with clang tidy * moved default constructors and destructors to header * fix issue * Use default again --- Source/Particles/WarpXParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/WarpXParticleContainer.cpp') diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 1d057f5a2..ca9b99500 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -783,8 +783,8 @@ Real WarpXParticleContainer::sumParticleCharge(bool local) { for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti) { auto& wp = pti.GetAttribs(PIdx::w); - for (unsigned long i = 0; i < wp.size(); i++) { - total_charge += wp[i]; + for (const auto& tt : wp) { + total_charge += tt; } } } -- cgit v1.2.3