Apply clang-format to source tree
[alexxy/gromacs.git] / src / testutils / testoptions.cpp
index 5f63a6d970e356793a54440633ed9b314bc4acde..02749d82596e62df18b5585d397ff80fce3ad4be 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2019, 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.
@@ -63,55 +63,55 @@ namespace
  */
 class TestOptionsRegistry
 {
-    public:
-        //! Returns the singleton instance of this class.
-        static TestOptionsRegistry &getInstance()
-        {
-            static TestOptionsRegistry singleton;
-            return singleton;
-        }
+public:
+    //! Returns the singleton instance of this class.
+    static TestOptionsRegistry& getInstance()
+    {
+        static TestOptionsRegistry singleton;
+        return singleton;
+    }
 
-        //! Adds a provider into the registry.
-        void add(const char * /*name*/, TestOptionsProvider *provider)
-        {
-            lock_guard<Mutex> lock(listMutex_);
-            providerList_.push_back(provider);
-        }
+    //! Adds a provider into the registry.
+    void add(const char* /*name*/, TestOptionsProvider* provider)
+    {
+        lock_guard<Mutex> lock(listMutex_);
+        providerList_.push_back(provider);
+    }
 
-        //! Initializes the options from all the provides.
-        void initOptions(IOptionsContainer *options);
+    //! Initializes the options from all the provides.
+    void initOptions(IOptionsContainer* options);
 
-    private:
-        TestOptionsRegistry() {}
+private:
+    TestOptionsRegistry() {}
 
-        typedef std::list<TestOptionsProvider *> ProviderList;
+    typedef std::list<TestOptionsProvider*> ProviderList;
 
-        Mutex                   listMutex_;
-        ProviderList            providerList_;
+    Mutex        listMutex_;
+    ProviderList providerList_;
 
-        GMX_DISALLOW_COPY_AND_ASSIGN(TestOptionsRegistry);
+    GMX_DISALLOW_COPY_AND_ASSIGN(TestOptionsRegistry);
 };
 
-void TestOptionsRegistry::initOptions(IOptionsContainer *options)
+void TestOptionsRegistry::initOptions(IOptionsContaineroptions)
 {
     // TODO: Have some deterministic order for the options; now it depends on
     // the order in which the global initializers are run.
-    lock_guard<Mutex>             lock(listMutex_);
-    ProviderList::const_iterator  i;
+    lock_guard<Mutex>            lock(listMutex_);
+    ProviderList::const_iterator i;
     for (i = providerList_.begin(); i != providerList_.end(); ++i)
     {
         (*i)->initOptions(options);
     }
 }
 
-}       // namespace
+} // namespace
 
-void registerTestOptions(const char *name, TestOptionsProvider *provider)
+void registerTestOptions(const char* name, TestOptionsProvider* provider)
 {
     TestOptionsRegistry::getInstance().add(name, provider);
 }
 
-void initTestOptions(IOptionsContainer *options)
+void initTestOptions(IOptionsContaineroptions)
 {
     TestOptionsRegistry::getInstance().initOptions(options);
 }