diff options
author | 2020-10-19 10:17:46 +0200 | |
---|---|---|
committer | 2020-10-19 01:17:46 -0700 | |
commit | 1e7de3b536c974327513d17f9aee156d93030825 (patch) | |
tree | fb5885e8fbbbfdd51d5d9efcc53c597a41b2fa1d /Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp | |
parent | 1f8f4f74adf7d460c593752a83e3574cc5cc0589 (diff) | |
download | WarpX-1e7de3b536c974327513d17f9aee156d93030825.tar.gz WarpX-1e7de3b536c974327513d17f9aee156d93030825.tar.zst WarpX-1e7de3b536c974327513d17f9aee156d93030825.zip |
Replace wherever possible '.reset(new' with '= make_unique' (#1429)
* replace wherever possible .reset(new with = make_unique
* fixed bug
* fixed bug
* revert WarpXOpenPMD.cpp to the original version
* removed another .reset(new
Diffstat (limited to 'Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp')
-rw-r--r-- | Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp b/Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp index 85624c6a1..b2fd64a98 100644 --- a/Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp +++ b/Source/Diagnostics/ReducedDiags/ParticleHistogram.cpp @@ -8,9 +8,12 @@ #include "ParticleHistogram.H" #include "WarpX.H" #include "Utils/WarpXUtil.H" + #include <AMReX_REAL.H> #include <AMReX_ParticleReduce.H> + #include <limits> +#include <memory> using namespace amrex; @@ -44,8 +47,8 @@ ParticleHistogram::ParticleHistogram (std::string rd_name) std::string function_string = ""; Store_parserString(pp,"histogram_function(t,x,y,z,ux,uy,uz)", function_string); - m_parser.reset(new ParserWrapper<m_nvars>( - makeParser(function_string,{"t","x","y","z","ux","uy","uz"}))); + m_parser = std::make_unique<ParserWrapper<m_nvars>>( + makeParser(function_string,{"t","x","y","z","ux","uy","uz"})); // read normalization type std::string norm_string = "default"; |