Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / restraint / manager.cpp
index e80182c99034959b657adebb44a8b2585ac6f28c..ad73da367e36d66fe88fccea1b9829b9abbbc90d 100644 (file)
@@ -61,48 +61,47 @@ namespace gmx
  */
 class RestraintManager::Impl
 {
-    public:
-
-        /*!
-         * \brief Implement Manager::addToSpec()
-         *
-         * \param restraint Handle to be added to the manager.
-         * \param name Identifying string for restraint.
-         */
-        void add(std::shared_ptr<::gmx::IRestraintPotential> restraint, const std::string &name);
-
-        /*!
-         * \brief Clear registered restraints and reset the manager.
-         */
-        void clear() noexcept;
-
-        /*!
-         * \brief The list of configured restraints.
-         *
-         * Clients can extend the life of a restraint implementation object that
-         * is being used by holding the shared_ptr handle. A RestraintManager::Impl is logically
-         * const when its owning Manager is logically const, but the Manager can still
-         * grant access to individual restraints.
-         */
-        std::vector< std::shared_ptr<::gmx::IRestraintPotential> > restraint_;
-
-    private:
-        //! Regulate initialization of the shared resource when (re)initialized.
-        static std::mutex initializationMutex_;
-
+public:
+    /*!
+     * \brief Implement Manager::addToSpec()
+     *
+     * \param restraint Handle to be added to the manager.
+     * \param name Identifying string for restraint.
+     */
+    void add(std::shared_ptr<::gmx::IRestraintPotential> restraint, const std::string& name);
+
+    /*!
+     * \brief Clear registered restraints and reset the manager.
+     */
+    void clear() noexcept;
+
+    /*!
+     * \brief The list of configured restraints.
+     *
+     * Clients can extend the life of a restraint implementation object that
+     * is being used by holding the shared_ptr handle. A RestraintManager::Impl is logically
+     * const when its owning Manager is logically const, but the Manager can still
+     * grant access to individual restraints.
+     */
+    std::vector<std::shared_ptr<::gmx::IRestraintPotential>> restraint_;
+
+private:
+    //! Regulate initialization of the shared resource when (re)initialized.
+    static std::mutex initializationMutex_;
 };
 
 // Initialize static members
-std::mutex RestraintManager::Impl::initializationMutex_ {};
+std::mutex RestraintManager::Impl::initializationMutex_{};
 
 
-void RestraintManager::Impl::add(std::shared_ptr<::gmx::IRestraintPotential> restraint, const std::string &name)
+void RestraintManager::Impl::add(std::shared_ptr<::gmx::IRestraintPotential> restraint,
+                                 const std::string&                          name)
 {
     (void)name;
     restraint_.emplace_back(std::move(restraint));
 }
 
-RestraintManager::RestraintManager() : instance_(std::make_shared<RestraintManager::Impl>()) {};
+RestraintManager::RestraintManager() : instance_(std::make_shared<RestraintManager::Impl>()){};
 
 RestraintManager::~RestraintManager() = default;
 
@@ -118,13 +117,12 @@ void RestraintManager::clear() noexcept
     instance_->clear();
 }
 
-void RestraintManager::addToSpec(std::shared_ptr<gmx::IRestraintPotential> puller,
-                                 const std::string                        &name)
+void RestraintManager::addToSpec(std::shared_ptr<gmx::IRestraintPotential> puller, const std::string& name)
 {
     instance_->add(std::move(puller), name);
 }
 
-std::vector< std::shared_ptr<IRestraintPotential> > RestraintManager::getRestraints() const
+std::vector<std::shared_ptr<IRestraintPotential>> RestraintManager::getRestraints() const
 {
     return instance_->restraint_;
 }