Update clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I58738190d06bf216a13048d768aa4054d820d2e8
diff --git a/src/callback.hpp b/src/callback.hpp
index 099cd7c..bc3ec48 100644
--- a/src/callback.hpp
+++ b/src/callback.hpp
@@ -2,12 +2,13 @@
#include "data_types.hpp"
-#include <chrono>
-#include <cstddef>
#include <sdeventplus/clock.hpp>
#include <sdeventplus/event.hpp>
#include <sdeventplus/utility/timer.hpp>
+#include <chrono>
+#include <cstddef>
+
namespace phosphor
{
namespace dbus
@@ -83,8 +84,7 @@
explicit IndexedConditional(const PropertyIndex& conditionIndex) :
Conditional(), index(conditionIndex)
- {
- }
+ {}
/** @brief Test the condition. */
virtual bool operator()() override = 0;
@@ -108,8 +108,7 @@
virtual ~IndexedCallback() = default;
explicit IndexedCallback(const PropertyIndex& callbackIndex) :
Callback(), index(callbackIndex)
- {
- }
+ {}
/** @brief Run the callback. */
virtual void operator()(Context ctx) override = 0;
@@ -141,8 +140,7 @@
~GroupOfCallbacks() = default;
explicit GroupOfCallbacks(const std::vector<size_t>& graphEntry) :
graph(graphEntry)
- {
- }
+ {}
/** @brief Run the callbacks. */
void operator()(Context ctx) override
@@ -175,8 +173,7 @@
Conditional& cond) :
graph(graphEntry),
condition(cond)
- {
- }
+ {}
/** @brief Run the callback if the condition is satisfied. */
virtual void operator()(Context ctx) override
@@ -225,8 +222,7 @@
const std::chrono::microseconds& delay) :
ConditionalCallback<CallbackAccess>(graphEntry, cond),
delayInterval(delay), timer(nullptr)
- {
- }
+ {}
/** @brief Start internal timer if the condition is satisfied.
*
diff --git a/src/count.hpp b/src/count.hpp
index 35bf5ed..f5c4bb3 100644
--- a/src/count.hpp
+++ b/src/count.hpp
@@ -49,8 +49,7 @@
bool oneshot = false) :
IndexedConditional(conditionIndex),
countOp(_countOp), propertyOp(_propertyOp), oneshot(oneshot)
- {
- }
+ {}
bool operator()() override
{
diff --git a/src/data_types.hpp b/src/data_types.hpp
index b266a29..731e7e8 100644
--- a/src/data_types.hpp
+++ b/src/data_types.hpp
@@ -2,14 +2,14 @@
#include "tupleref.hpp"
-#include <any>
#include <sdbusplus/message.hpp>
#include <sdbusplus/utility/merge_variants.hpp>
-#include <string>
#include <xyz/openbmc_project/Association/Definitions/server.hpp>
#include <xyz/openbmc_project/Logging/Entry/server.hpp>
#include <xyz/openbmc_project/Software/Version/server.hpp>
+#include <any>
+
namespace phosphor
{
namespace dbus
diff --git a/src/elog.hpp b/src/elog.hpp
index 24a4582..4b3916e 100644
--- a/src/elog.hpp
+++ b/src/elog.hpp
@@ -4,6 +4,8 @@
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <sdbusplus/exception.hpp>
+
+#include <experimental/tuple>
#include <string>
#include <tuple>
@@ -50,8 +52,7 @@
ElogBase& operator=(ElogBase&&) = default;
virtual ~ElogBase() = default;
ElogBase() : Callback()
- {
- }
+ {}
/** @brief Callback interface implementation. */
void operator()(Context ctx) override;
@@ -100,8 +101,7 @@
~Elog() = default;
Elog(Args&&... arguments) :
ElogBase(), args(std::forward<Args>(arguments)...)
- {
- }
+ {}
private:
/** @brief elog interface implementation. */
@@ -150,8 +150,7 @@
virtual ~ElogWithMetadataCapture() = default;
explicit ElogWithMetadataCapture(const PropertyIndex& index) :
IndexedCallback(index)
- {
- }
+ {}
/**
* @brief Callback interface implementation that
diff --git a/src/event.hpp b/src/event.hpp
index d8ab917..13c6d52 100644
--- a/src/event.hpp
+++ b/src/event.hpp
@@ -4,6 +4,7 @@
#include "event_manager.hpp"
#include <phosphor-logging/log.hpp>
+
#include <sstream>
#include <string>
@@ -31,8 +32,7 @@
EventBase& operator=(EventBase&&) = default;
virtual ~EventBase() = default;
EventBase(const PropertyIndex& index) : IndexedCallback(index)
- {
- }
+ {}
/** @brief Callback interface implementation. */
void operator()(Context ctx) override
@@ -97,8 +97,7 @@
const PropertyIndex& index) :
EventBase(index),
name(eventName), message(eventMessage)
- {
- }
+ {}
private:
/** @brief Create the event Dbus Object.
diff --git a/src/event_entry.hpp b/src/event_entry.hpp
index 1f99d81..032099d 100644
--- a/src/event_entry.hpp
+++ b/src/event_entry.hpp
@@ -5,6 +5,7 @@
#include <sdbusplus/bus.hpp>
#include <sdbusplus/server/object.hpp>
+
#include <string>
namespace phosphor
diff --git a/src/event_manager.hpp b/src/event_manager.hpp
index c114000..261fa9f 100644
--- a/src/event_manager.hpp
+++ b/src/event_manager.hpp
@@ -2,10 +2,11 @@
#include "event_entry.hpp"
+#include <sdbusplus/bus.hpp>
+
#include <map>
#include <memory>
#include <queue>
-#include <sdbusplus/bus.hpp>
#include <string>
namespace phosphor
diff --git a/src/event_serialize.cpp b/src/event_serialize.cpp
index 780f8c4..9ff5308 100644
--- a/src/event_serialize.cpp
+++ b/src/event_serialize.cpp
@@ -5,9 +5,10 @@
#include <cereal/archives/binary.hpp>
#include <cereal/types/string.hpp>
#include <cereal/types/vector.hpp>
-#include <fstream>
#include <phosphor-logging/log.hpp>
+#include <fstream>
+
// Register class version
// From cereal documentation;
// "This macro should be placed at global scope"
diff --git a/src/filters.hpp b/src/filters.hpp
index 13b1533..ba11673 100644
--- a/src/filters.hpp
+++ b/src/filters.hpp
@@ -50,8 +50,7 @@
virtual ~OperandFilters() = default;
explicit OperandFilters(const std::vector<std::function<bool(T)>>& _ops) :
Filters(), ops(std::move(_ops))
- {
- }
+ {}
bool operator()(const std::any& value) override
{
diff --git a/src/format.hpp b/src/format.hpp
index 8fa6dc8..315fce9 100644
--- a/src/format.hpp
+++ b/src/format.hpp
@@ -16,8 +16,7 @@
/** @brief Map format strings to undecorated C++ types. */
template <typename T>
struct GetFormatType
-{
-};
+{};
template <>
struct GetFormatType<bool>
{
diff --git a/src/journal.hpp b/src/journal.hpp
index ad792fb..c9c2d8b 100644
--- a/src/journal.hpp
+++ b/src/journal.hpp
@@ -4,6 +4,7 @@
#include "format.hpp"
#include <phosphor-logging/log.hpp>
+
#include <string>
namespace phosphor
@@ -31,8 +32,7 @@
virtual ~JournalBase() = default;
JournalBase(const char* msg, const PropertyIndex& index) :
IndexedCallback(index), message(msg)
- {
- }
+ {}
/** @brief Callback interface implementation. */
void operator()(Context ctx) override;
@@ -89,8 +89,7 @@
~Journal() = default;
Journal(const char* msg, const PropertyIndex& index) :
JournalBase(msg, index)
- {
- }
+ {}
private:
/** @brief log interface implementation. */
diff --git a/src/median.hpp b/src/median.hpp
index 8498726..9976972 100644
--- a/src/median.hpp
+++ b/src/median.hpp
@@ -46,8 +46,7 @@
bool oneshot = false) :
IndexedConditional(conditionIndex),
medianOp(_medianOp), oneshot(oneshot)
- {
- }
+ {}
bool operator()() override
{
diff --git a/src/method.hpp b/src/method.hpp
index 92d6396..9aa86ba 100644
--- a/src/method.hpp
+++ b/src/method.hpp
@@ -3,6 +3,8 @@
#include "callback.hpp"
#include <phosphor-logging/log.hpp>
+
+#include <experimental/tuple>
#include <string>
#include <tuple>
@@ -69,8 +71,7 @@
const std::string& m) :
Callback(),
bus(b), path(p), interface(i), method(m)
- {
- }
+ {}
/** @brief Callback interface implementation. */
void operator()(Context ctx) override = 0;
@@ -103,8 +104,7 @@
MethodArgs&&... arguments) :
MethodBase(bus, path, iface, method),
args(std::forward<MethodArgs>(arguments)...)
- {
- }
+ {}
/** @brief Callback interface implementation. */
void operator()(Context ctx) override
diff --git a/src/pathwatch.hpp b/src/pathwatch.hpp
index 25fd6de..bc0cb3a 100644
--- a/src/pathwatch.hpp
+++ b/src/pathwatch.hpp
@@ -36,8 +36,7 @@
virtual ~PathWatch() = default;
PathWatch(const std::string& path, Callback& callback) :
Watch(), objectPath(path), cb(callback), alreadyRan(false)
- {
- }
+ {}
/** @brief Start the watch.
*
diff --git a/src/pathwatchimpl.hpp b/src/pathwatchimpl.hpp
index 8b7e8ee..e1e8f97 100644
--- a/src/pathwatchimpl.hpp
+++ b/src/pathwatchimpl.hpp
@@ -11,6 +11,7 @@
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/message.hpp>
+
#include <vector>
namespace phosphor
diff --git a/src/propertywatch.hpp b/src/propertywatch.hpp
index 8a3c07b..1d88eae 100644
--- a/src/propertywatch.hpp
+++ b/src/propertywatch.hpp
@@ -44,8 +44,7 @@
Watch(),
index(watchIndex), cb(callback), alreadyRan(false),
ignoreStartCallback(ignoreStartCallback)
- {
- }
+ {}
/** @brief Start the watch.
*
@@ -130,16 +129,14 @@
PropertyWatch<DBusInterfaceType>(watchIndex, ignoreStartCallback,
&callback),
filterOps(filterOps)
- {
- }
+ {}
PropertyWatchOfType(const PropertyIndex& watchIndex,
bool ignoreStartCallback = false,
Filters* filterOps = nullptr) :
PropertyWatch<DBusInterfaceType>(watchIndex, ignoreStartCallback,
nullptr),
filterOps(filterOps)
- {
- }
+ {}
/** @brief PropertyMatch implementation for PropertyWatchOfType.
*
diff --git a/src/propertywatchimpl.hpp b/src/propertywatchimpl.hpp
index 0187bd1..ae0ed29 100644
--- a/src/propertywatchimpl.hpp
+++ b/src/propertywatchimpl.hpp
@@ -6,6 +6,7 @@
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/message.hpp>
+
#include <string>
#include <vector>
diff --git a/src/resolve_errors.hpp b/src/resolve_errors.hpp
index 979261a..d8038ba 100644
--- a/src/resolve_errors.hpp
+++ b/src/resolve_errors.hpp
@@ -34,8 +34,7 @@
* Normally an inventory path.
*/
explicit ResolveCallout(const std::string& callout) : callout(callout)
- {
- }
+ {}
/**
* @brief Callback interface to resolve errors
diff --git a/src/sdbusplus.hpp b/src/sdbusplus.hpp
index f7049ac..1ff38a8 100644
--- a/src/sdbusplus.hpp
+++ b/src/sdbusplus.hpp
@@ -7,6 +7,7 @@
#include <sdbusplus/bus/match.hpp>
#include <sdbusplus/exception.hpp>
#include <sdbusplus/message.hpp>
+
#include <string>
struct Loop;
diff --git a/src/snmp_trap.hpp b/src/snmp_trap.hpp
index 4555e65..34169b8 100644
--- a/src/snmp_trap.hpp
+++ b/src/snmp_trap.hpp
@@ -57,15 +57,13 @@
SNMPTrap& operator=(SNMPTrap&&) = default;
virtual ~SNMPTrap() = default;
SNMPTrap() : Callback()
- {
- }
+ {}
/** @brief Callback interface implementation.
* @param[in] ctc - context.
*/
void operator()(Context ctx)
- {
- }
+ {}
/** @brief Callback interface implementation.
* @param[in] ctc - context.
diff --git a/src/test/propertywatchtest.cpp b/src/test/propertywatchtest.cpp
index 6ae36c9..1df64fb 100644
--- a/src/test/propertywatchtest.cpp
+++ b/src/test/propertywatchtest.cpp
@@ -52,8 +52,7 @@
template <typename T>
struct Values
-{
-};
+{};
template <>
struct Values<uint8_t>
{
@@ -123,8 +122,7 @@
template <typename T>
struct FilteredValues
-{
-};
+{};
template <>
struct FilteredValues<uint8_t>
diff --git a/src/test/propertywatchtest.hpp b/src/test/propertywatchtest.hpp
index e27ba18..6fcf45f 100644
--- a/src/test/propertywatchtest.hpp
+++ b/src/test/propertywatchtest.hpp
@@ -295,8 +295,7 @@
*/
template <typename T>
struct Expect
-{
-};
+{};
template <>
struct Expect<uint64_t>