Apply clang-format to source tree
[alexxy/gromacs.git] / src / api / cpp / system.cpp
index 666a14f4c449093aff419880f3604828ff4d60ca..604f5c069f1ad27ca7a97fc348722b7ad40e52cc 100644 (file)
@@ -56,9 +56,9 @@ namespace gmxapi
 //! \cond
 System::Impl::~Impl() = default;
 
-System::Impl::Impl(System::Impl &&) noexcept = default;
+System::Impl::Impl(System::Impl&&) noexcept = default;
 
-System::Impl &System::Impl::operator=(System::Impl &&source) noexcept
+System::Impl& System::Impl::operator=(System::Impl&& source) noexcept
 {
     if (this != &source)
     {
@@ -68,14 +68,13 @@ System::Impl &System::Impl::operator=(System::Impl &&source) noexcept
 }
 //! \endcond
 
-std::shared_ptr<Session> System::launch(const std::shared_ptr<Context> &context)
+std::shared_ptr<Session> System::launch(const std::shared_ptr<Context>context)
 {
     return impl_->launch(context);
 }
 
 //! \cond
-System::System(std::unique_ptr<Impl> implementation) :
-    impl_ {std::move(implementation)}
+System::System(std::unique_ptr<Impl> implementation) : impl_{ std::move(implementation) }
 {
     GMX_ASSERT(impl_, "Constructor requires valid implementation object.");
 }
@@ -83,11 +82,11 @@ System::System(std::unique_ptr<Impl> implementation) :
 System::~System() = default;
 //! \endcond
 
-System::System(System &&) noexcept = default;
+System::System(System&&) noexcept = default;
 
-System &System::operator=(System &&) noexcept = default;
+System& System::operator=(System&&) noexcept = default;
 
-System fromTprFile(const std::string &filename)
+System fromTprFile(const std::stringfilename)
 {
     // TODO Confirm the file is readable and parseable and note unique
     // identifying information for when the work spec is used in a different
@@ -125,7 +124,7 @@ System::Impl::Impl(std::unique_ptr<gmxapi::Workflow> workflow) noexcept :
     GMX_ASSERT(spec_, "Class invariant implies non-null work specification member.");
 }
 
-std::shared_ptr<Session> System::Impl::launch(const std::shared_ptr<Context> &context)
+std::shared_ptr<Session> System::Impl::launch(const std::shared_ptr<Context>context)
 {
     std::shared_ptr<Session> session = nullptr;
     if (context != nullptr)
@@ -134,12 +133,11 @@ std::shared_ptr<Session> System::Impl::launch(const std::shared_ptr<Context> &co
         session = context->launch(*workflow_);
         GMX_ASSERT(session, "Context::launch() expected to produce non-null session.");
 
-        for (auto && module : spec_->getModules())
+        for (auto&& module : spec_->getModules())
         {
             // TODO: This should be the job of the launching code that produces the Session.
             // Configure the restraints in a restraint manager made available to the session launcher.
-            addSessionRestraint(session.get(),
-                                module);
+            addSessionRestraint(session.get(), module);
         }
     }
     else