Use make_unique instead of reset when private implementations are constructed
[alexxy/gromacs.git] / src / gromacs / commandline / tests / cmdlinemodulemanagertest.cpp
index cb31e7c6cd8899b5cedf0835cce5f2387c6965ff..9d7684be2e616bda64bab5ba7dabbfa4f40ca91b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2019,2020,2021, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -143,7 +143,7 @@ CommandLineModuleManagerTestBase::~CommandLineModuleManagerTestBase() {}
 void CommandLineModuleManagerTestBase::initManager(const CommandLine& args, const char* realBinaryName)
 {
     GMX_RELEASE_ASSERT(impl_ == nullptr, "initManager() called more than once in test");
-    impl_.reset(new Impl(args, realBinaryName));
+    impl_ = std::make_unique<Impl>(args, realBinaryName);
 }
 
 MockModule& CommandLineModuleManagerTestBase::addModule(const char* name, const char* description)