clang-format: Update to match docs repo
Update the .clang-format file and run clang-format-6.0.
This .clang-format matches the example one in
https://github.com/openbmc/docs/blob/master/cpp-style-and-conventions.md#clang-formatting
Change-Id: Ic2c462525eb27b8295c2b298871e04268d93faf2
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/epoch_base.cpp b/epoch_base.cpp
index 8aa41dd..9346391 100644
--- a/epoch_base.cpp
+++ b/epoch_base.cpp
@@ -1,12 +1,11 @@
#include "epoch_base.hpp"
-#include <phosphor-logging/elog.hpp>
-#include <phosphor-logging/elog-errors.hpp>
-#include <phosphor-logging/log.hpp>
-#include <xyz/openbmc_project/Time/error.hpp>
-
#include <iomanip>
+#include <phosphor-logging/elog-errors.hpp>
+#include <phosphor-logging/elog.hpp>
+#include <phosphor-logging/log.hpp>
#include <sstream>
+#include <xyz/openbmc_project/Time/error.hpp>
namespace // anonymous
{
@@ -14,7 +13,7 @@
constexpr auto SYSTEMD_TIME_PATH = "/org/freedesktop/timedate1";
constexpr auto SYSTEMD_TIME_INTERFACE = "org.freedesktop.timedate1";
constexpr auto METHOD_SET_TIME = "SetTime";
-}
+} // namespace
namespace phosphor
{
@@ -22,13 +21,10 @@
{
using namespace phosphor::logging;
-using FailedError =
- sdbusplus::xyz::openbmc_project::Time::Error::Failed;
+using FailedError = sdbusplus::xyz::openbmc_project::Time::Error::Failed;
-EpochBase::EpochBase(sdbusplus::bus::bus& bus,
- const char* objPath)
- : sdbusplus::server::object::object<EpochTime>(bus, objPath),
- bus(bus)
+EpochBase::EpochBase(sdbusplus::bus::bus& bus, const char* objPath) :
+ sdbusplus::server::object::object<EpochTime>(bus, objPath), bus(bus)
{
}
@@ -45,12 +41,10 @@
using namespace std::chrono;
bool EpochBase::setTime(const microseconds& usec)
{
- auto method = bus.new_method_call(SYSTEMD_TIME_SERVICE,
- SYSTEMD_TIME_PATH,
- SYSTEMD_TIME_INTERFACE,
- METHOD_SET_TIME);
+ auto method = bus.new_method_call(SYSTEMD_TIME_SERVICE, SYSTEMD_TIME_PATH,
+ SYSTEMD_TIME_INTERFACE, METHOD_SET_TIME);
method.append(static_cast<int64_t>(usec.count()),
- false, // relative
+ false, // relative
false); // user_interaction
try
@@ -61,8 +55,7 @@
{
log<level::ERR>("Error in setting system time");
using namespace xyz::openbmc_project::Time;
- elog<FailedError>(
- Failed::REASON(ex.what()));
+ elog<FailedError>(Failed::REASON(ex.what()));
}
return true;
}
@@ -70,8 +63,7 @@
microseconds EpochBase::getTime() const
{
auto now = system_clock::now();
- return duration_cast<microseconds>
- (now.time_since_epoch());
+ return duration_cast<microseconds>(now.time_since_epoch());
}
} // namespace time