Enable clang-format

Fix up errors and enable clang-format during CI builds.

Change-Id: I4176b81f8b85a287af9354165e09ff66aeb9fb29
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/src/method.hpp b/src/method.hpp
index 9475fb8..7c29205 100644
--- a/src/method.hpp
+++ b/src/method.hpp
@@ -19,22 +19,14 @@
  *  @tparam DBusInterface - The DBus interface to use.
  *  @tparam MethodArgs - DBus method argument types.
  */
-template <typename DBusInterface, typename ...MethodArgs>
-struct CallDBusMethod
+template <typename DBusInterface, typename... MethodArgs> struct CallDBusMethod
 {
-    static void op(
-        const std::string& bus,
-        const std::string& path,
-        const std::string& iface,
-        const std::string& method,
-        MethodArgs&& ...args)
+    static void op(const std::string& bus, const std::string& path,
+                   const std::string& iface, const std::string& method,
+                   MethodArgs&&... args)
     {
-        DBusInterface::callMethodNoReply(
-            bus,
-            path,
-            iface,
-            method,
-            std::forward<MethodArgs>(args)...);
+        DBusInterface::callMethodNoReply(bus, path, iface, method,
+                                         std::forward<MethodArgs>(args)...);
     }
 };
 } // namespace detail
@@ -46,32 +38,28 @@
  */
 class MethodBase : public Callback
 {
-    public:
-        MethodBase() = delete;
-        MethodBase(const MethodBase&) = delete;
-        MethodBase(MethodBase&&) = default;
-        MethodBase& operator=(const MethodBase&) = delete;
-        MethodBase& operator=(MethodBase&&) = default;
-        virtual ~MethodBase() = default;
-        MethodBase(
-            const std::string& b,
-            const std::string& p,
-            const std::string& i,
-            const std::string& m)
-            : Callback(),
-              bus(b),
-              path(p),
-              interface(i),
-                  method(m) {}
+  public:
+    MethodBase() = delete;
+    MethodBase(const MethodBase&) = delete;
+    MethodBase(MethodBase&&) = default;
+    MethodBase& operator=(const MethodBase&) = delete;
+    MethodBase& operator=(MethodBase&&) = default;
+    virtual ~MethodBase() = default;
+    MethodBase(const std::string& b, const std::string& p, const std::string& i,
+               const std::string& m) :
+        Callback(),
+        bus(b), path(p), interface(i), method(m)
+    {
+    }
 
-        /** @brief Callback interface implementation. */
-        void operator()(Context ctx) override = 0;
+    /** @brief Callback interface implementation. */
+    void operator()(Context ctx) override = 0;
 
-    protected:
-        const std::string& bus;
-        const std::string& path;
-        const std::string& interface;
-        const std::string& method;
+  protected:
+    const std::string& bus;
+    const std::string& path;
+    const std::string& interface;
+    const std::string& method;
 };
 
 /** @class Method
@@ -80,57 +68,46 @@
  *  @tparam DBusInterface - The DBus interface to use to call the method.
  *  @tparam MethodArgs - DBus method argument types.
  */
-template <typename DBusInterface, typename ...MethodArgs>
+template <typename DBusInterface, typename... MethodArgs>
 class Method : public MethodBase
 {
-    public:
-        Method() = delete;
-        Method(const Method&) = default;
-        Method(Method&&) = default;
-        Method& operator=(const Method&) = default;
-        Method& operator=(Method&&) = default;
-        ~Method() = default;
-        Method(
-            const std::string& bus,
-            const std::string& path,
-            const std::string& iface,
-            const std::string& method,
-            MethodArgs&& ... arguments)
-            : MethodBase(bus, path, iface, method),
-              args(std::forward<MethodArgs>(arguments)...) {}
+  public:
+    Method() = delete;
+    Method(const Method&) = default;
+    Method(Method&&) = default;
+    Method& operator=(const Method&) = default;
+    Method& operator=(Method&&) = default;
+    ~Method() = default;
+    Method(const std::string& bus, const std::string& path,
+           const std::string& iface, const std::string& method,
+           MethodArgs&&... arguments) :
+        MethodBase(bus, path, iface, method),
+        args(std::forward<MethodArgs>(arguments)...)
+    {
+    }
 
-        /** @brief Callback interface implementation. */
-        void operator()(Context ctx) override
-        {
-            std::experimental::apply(
-                detail::CallDBusMethod<DBusInterface, MethodArgs...>::op,
-                std::tuple_cat(
-                    std::make_tuple(bus),
-                    std::make_tuple(path),
-                    std::make_tuple(interface),
-                    std::make_tuple(method),
-                    args));
-        }
+    /** @brief Callback interface implementation. */
+    void operator()(Context ctx) override
+    {
+        std::experimental::apply(
+            detail::CallDBusMethod<DBusInterface, MethodArgs...>::op,
+            std::tuple_cat(std::make_tuple(bus), std::make_tuple(path),
+                           std::make_tuple(interface), std::make_tuple(method),
+                           args));
+    }
 
-    private:
-        std::tuple<MethodArgs...> args;
+  private:
+    std::tuple<MethodArgs...> args;
 };
 
 /** @brief Argument type deduction for constructing Method instances. */
-template <typename DBusInterface, typename ...MethodArgs>
-auto makeMethod(
-    const std::string& bus,
-    const std::string& path,
-    const std::string& iface,
-    const std::string& method,
-    MethodArgs&& ... arguments)
+template <typename DBusInterface, typename... MethodArgs>
+auto makeMethod(const std::string& bus, const std::string& path,
+                const std::string& iface, const std::string& method,
+                MethodArgs&&... arguments)
 {
     return std::make_unique<Method<DBusInterface, MethodArgs...>>(
-               bus,
-               path,
-               iface,
-               method,
-               std::forward<MethodArgs>(arguments)...);
+        bus, path, iface, method, std::forward<MethodArgs>(arguments)...);
 }
 
 } // namespace monitoring