aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2022-05-10 00:11:11 +0200
committerGravatar GitHub <noreply@github.com> 2022-05-09 22:11:11 +0000
commite1808e6894519a68449a596d77db706d85d5aca0 (patch)
treec3d85c0474386eb9abbdf4b252517a292da85664 /Source/Particles/WarpXParticleContainer.cpp
parent4217c76c39648358ec7a43c6cdf672d5e1ef8858 (diff)
downloadWarpX-e1808e6894519a68449a596d77db706d85d5aca0.tar.gz
WarpX-e1808e6894519a68449a596d77db706d85d5aca0.tar.zst
WarpX-e1808e6894519a68449a596d77db706d85d5aca0.zip
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
Diffstat (limited to '')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}
}
}