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/sdevent.hpp b/src/sdevent.hpp
index dc912c1..4fed159 100644
--- a/src/sdevent.hpp
+++ b/src/sdevent.hpp
@@ -17,22 +17,22 @@
*/
class SDEvent
{
- protected:
- /** @brief Share a single event loop amongst users. */
- static auto& getEvent()
- {
- static auto event = sdevent::event::newDefault();
- return event;
- }
+ protected:
+ /** @brief Share a single event loop amongst users. */
+ static auto& getEvent()
+ {
+ static auto event = sdevent::event::newDefault();
+ return event;
+ }
- public:
- /** @brief Wrapper for sd_event_now. */
- static auto now()
- {
- return getEvent().now();
- }
+ public:
+ /** @brief Wrapper for sd_event_now. */
+ static auto now()
+ {
+ return getEvent().now();
+ }
- friend Loop;
+ friend Loop;
};
/** @class SDEventTimer
@@ -40,45 +40,46 @@
*/
class SDEventTimer : public SDEvent
{
- public:
- SDEventTimer() = delete;
- SDEventTimer(const SDEventTimer&) = default;
- SDEventTimer(SDEventTimer&&) = default;
- SDEventTimer& operator=(const SDEventTimer&) = default;
- SDEventTimer& operator=(SDEventTimer&&) = default;
- ~SDEventTimer() = default;
+ public:
+ SDEventTimer() = delete;
+ SDEventTimer(const SDEventTimer&) = default;
+ SDEventTimer(SDEventTimer&&) = default;
+ SDEventTimer& operator=(const SDEventTimer&) = default;
+ SDEventTimer& operator=(SDEventTimer&&) = default;
+ ~SDEventTimer() = default;
- explicit SDEventTimer(
- const sdevent::event::timer::Timer::Callback& callback)
- : timer(getEvent(), callback) {}
+ explicit SDEventTimer(
+ const sdevent::event::timer::Timer::Callback& callback) :
+ timer(getEvent(), callback)
+ {
+ }
- /** @brief Update a timer expiration. */
- void update(
- const std::chrono::steady_clock::time_point& expires)
- {
- timer.setTime(expires);
- }
+ /** @brief Update a timer expiration. */
+ void update(const std::chrono::steady_clock::time_point& expires)
+ {
+ timer.setTime(expires);
+ }
- /** @brief Query timer state. */
- auto enabled()
- {
- return timer.enabled() != SD_EVENT_OFF;
- }
+ /** @brief Query timer state. */
+ auto enabled()
+ {
+ return timer.enabled() != SD_EVENT_OFF;
+ }
- /** @brief Enable a timer. */
- void enable()
- {
- timer.enable(SD_EVENT_ONESHOT);
- }
+ /** @brief Enable a timer. */
+ void enable()
+ {
+ timer.enable(SD_EVENT_ONESHOT);
+ }
- /** @brief Disable a timer. */
- void disable()
- {
- timer.enable(SD_EVENT_OFF);
- }
+ /** @brief Disable a timer. */
+ void disable()
+ {
+ timer.enable(SD_EVENT_OFF);
+ }
- private:
- sdevent::event::timer::Timer timer;
+ private:
+ sdevent::event::timer::Timer timer;
};
} // namespace monitoring