diff options
author | 2022-09-02 18:08:06 +0200 | |
---|---|---|
committer | 2022-09-02 09:08:06 -0700 | |
commit | d73bfa1f13efe9efcebc97f823aca8c96ac1f723 (patch) | |
tree | 9edcb2270ca6c3d12e2936d8d2341254f2744ced /Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp | |
parent | 09940d721ac2cbb6173f7a3855a969f1f6e98bce (diff) | |
download | WarpX-d73bfa1f13efe9efcebc97f823aca8c96ac1f723.tar.gz WarpX-d73bfa1f13efe9efcebc97f823aca8c96ac1f723.tar.zst WarpX-d73bfa1f13efe9efcebc97f823aca8c96ac1f723.zip |
Remove some magic numbers (#3355)
* remove some magic numbers
* fixed unreachable code issue
* fixed issue with unreachable code
* fixed issue with unreachable code
* remove type traits
* revert one change in Gaussian Laser
* improved ParticleExtrema
* fix bug
Diffstat (limited to 'Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp')
-rw-r--r-- | Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp b/Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp index 939f098ee..dbfc1b1d4 100644 --- a/Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp +++ b/Source/Particles/Collision/BackgroundStopping/BackgroundStopping.cpp @@ -59,8 +59,9 @@ BackgroundStopping::BackgroundStopping (std::string const collision_name) "For background stopping, the background temperature must be specified."); } - m_background_density_func = m_background_density_parser.compile<4>(); - m_background_temperature_func = m_background_temperature_parser.compile<4>(); + constexpr auto num_parser_args = 4; + m_background_density_func = m_background_density_parser.compile<num_parser_args>(); + m_background_temperature_func = m_background_temperature_parser.compile<num_parser_args>(); if (m_background_type == BackgroundStoppingType::ELECTRONS) { m_background_mass = PhysConst::m_e; |