From 1e7de3b536c974327513d17f9aee156d93030825 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Mon, 19 Oct 2020 10:17:46 +0200 Subject: 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 --- Source/Particles/PhysicalParticleContainer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 107ac10bd..7af6c4dd3 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -96,7 +96,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp { BackwardCompatibility(); - plasma_injector.reset(new PlasmaInjector(species_id, species_name)); + plasma_injector = std::make_unique(species_id, species_name); physical_species = plasma_injector->getPhysicalSpecies(); charge = plasma_injector->getCharge(); mass = plasma_injector->getMass(); @@ -179,8 +179,8 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp std::string function_string = ""; Store_parserString(pp,"plot_filter_function(t,x,y,z,ux,uy,uz)", function_string); - m_particle_filter_parser.reset(new ParserWrapper<7>( - makeParser(function_string,{"t","x","y","z","ux","uy","uz"}))); + m_particle_filter_parser = std::make_unique>( + makeParser(function_string,{"t","x","y","z","ux","uy","uz"})); } } @@ -188,7 +188,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core) : WarpXParticleContainer(amr_core, 0) { - plasma_injector.reset(new PlasmaInjector()); + plasma_injector = std::make_unique(); } void -- cgit v1.2.3