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/bmc_epoch.hpp b/bmc_epoch.hpp
index 228a39d..96c14b7 100644
--- a/bmc_epoch.hpp
+++ b/bmc_epoch.hpp
@@ -19,75 +19,74 @@
*/
class BmcEpoch : public EpochBase
{
- public:
- friend class TestBmcEpoch;
- BmcEpoch(sdbusplus::bus::bus& bus,
- const char* objPath);
- ~BmcEpoch();
+ public:
+ friend class TestBmcEpoch;
+ BmcEpoch(sdbusplus::bus::bus& bus, const char* objPath);
+ ~BmcEpoch();
- /**
- * @brief Get value of Elapsed property
- *
- * @return The elapsed microseconds since UTC
- **/
- uint64_t elapsed() const override;
+ /**
+ * @brief Get value of Elapsed property
+ *
+ * @return The elapsed microseconds since UTC
+ **/
+ uint64_t elapsed() const override;
- /**
- * @brief Set value of Elapsed property
- *
- * @param[in] value - The microseconds since UTC to set
- * @return The updated elapsed microseconds since UTC
- **/
- uint64_t elapsed(uint64_t value) override;
+ /**
+ * @brief Set value of Elapsed property
+ *
+ * @param[in] value - The microseconds since UTC to set
+ * @return The updated elapsed microseconds since UTC
+ **/
+ uint64_t elapsed(uint64_t value) override;
- /** @brief Set the listner for bmc time change
- *
- * @param[in] listener - The pointer to the listener
- */
- void setBmcTimeChangeListener(BmcTimeChangeListener* listener);
+ /** @brief Set the listner for bmc time change
+ *
+ * @param[in] listener - The pointer to the listener
+ */
+ void setBmcTimeChangeListener(BmcTimeChangeListener* listener);
- private:
- /** @brief The fd for time change event */
- int timeFd = -1;
+ private:
+ /** @brief The fd for time change event */
+ int timeFd = -1;
- /** @brief Initialize timerFd related resource */
- void initialize();
+ /** @brief Initialize timerFd related resource */
+ void initialize();
- /** @brief Notify the listeners that bmc time is changed
- *
- * @param[in] time - The epoch time in microseconds to notify
- */
- void notifyBmcTimeChange(const microseconds& time);
+ /** @brief Notify the listeners that bmc time is changed
+ *
+ * @param[in] time - The epoch time in microseconds to notify
+ */
+ void notifyBmcTimeChange(const microseconds& time);
- /** @brief The callback function on system time change
- *
- * @param[in] es - Source of the event
- * @param[in] fd - File descriptor of the timer
- * @param[in] revents - Not used
- * @param[in] userdata - User data pointer
- */
- static int onTimeChange(sd_event_source* es, int fd,
- uint32_t revents, void* userdata);
+ /** @brief The callback function on system time change
+ *
+ * @param[in] es - Source of the event
+ * @param[in] fd - File descriptor of the timer
+ * @param[in] revents - Not used
+ * @param[in] userdata - User data pointer
+ */
+ static int onTimeChange(sd_event_source* es, int fd, uint32_t revents,
+ void* userdata);
- /** @brief The reference of sdbusplus bus */
- sdbusplus::bus::bus& bus;
+ /** @brief The reference of sdbusplus bus */
+ sdbusplus::bus::bus& bus;
- /** @brief The deleter of sd_event_source */
- std::function<void(sd_event_source*)> sdEventSourceDeleter =
- [] (sd_event_source* p) {
- if (p)
- {
- sd_event_source_unref(p);
- }
- };
- using SdEventSource = std::unique_ptr<sd_event_source,
- decltype(sdEventSourceDeleter)>;
+ /** @brief The deleter of sd_event_source */
+ std::function<void(sd_event_source*)> sdEventSourceDeleter =
+ [](sd_event_source* p) {
+ if (p)
+ {
+ sd_event_source_unref(p);
+ }
+ };
+ using SdEventSource =
+ std::unique_ptr<sd_event_source, decltype(sdEventSourceDeleter)>;
- /** @brief The event source on system time change */
- SdEventSource timeChangeEventSource {nullptr, sdEventSourceDeleter};
+ /** @brief The event source on system time change */
+ SdEventSource timeChangeEventSource{nullptr, sdEventSourceDeleter};
- /** @brief The listener for bmc time change */
- BmcTimeChangeListener* timeChangeListener = nullptr;
+ /** @brief The listener for bmc time change */
+ BmcTimeChangeListener* timeChangeListener = nullptr;
};
} // namespace time