presence: Clang format updates
Used `format-code.sh` build script to make changes to conform to clang
format.
Tested: Compiled
Change-Id: I2fc795938e85a752ee56b54212d389c2ff296828
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/presence/psensor.hpp b/presence/psensor.hpp
index 7afbd75..8ce2d7e 100644
--- a/presence/psensor.hpp
+++ b/presence/psensor.hpp
@@ -21,71 +21,72 @@
*/
class PresenceSensor
{
- public:
- PresenceSensor(const PresenceSensor&) = default;
- PresenceSensor& operator=(const PresenceSensor&) = default;
- PresenceSensor(PresenceSensor&&) = default;
- PresenceSensor& operator=(PresenceSensor&&) = default;
- virtual ~PresenceSensor() = default;
- PresenceSensor() : id(nextId)
- {
- nextId++;
- }
+ public:
+ PresenceSensor(const PresenceSensor&) = default;
+ PresenceSensor& operator=(const PresenceSensor&) = default;
+ PresenceSensor(PresenceSensor&&) = default;
+ PresenceSensor& operator=(PresenceSensor&&) = default;
+ virtual ~PresenceSensor() = default;
+ PresenceSensor() : id(nextId)
+ {
+ nextId++;
+ }
- /**
- * @brief start
- *
- * Implementations should peform any preparation
- * for detecting presence. Typical implementations
- * might register signal callbacks or start
- * a polling loop.
- *
- * @return The state of the sensor.
- */
- virtual bool start() = 0;
+ /**
+ * @brief start
+ *
+ * Implementations should peform any preparation
+ * for detecting presence. Typical implementations
+ * might register signal callbacks or start
+ * a polling loop.
+ *
+ * @return The state of the sensor.
+ */
+ virtual bool start() = 0;
- /**
- * @brief stop
- *
- * Implementations should stop issuing presence
- * state change notifications. Typical implementations
- * might de-register signal callbacks or terminate
- * polling loops.
- */
- virtual void stop() = 0;
+ /**
+ * @brief stop
+ *
+ * Implementations should stop issuing presence
+ * state change notifications. Typical implementations
+ * might de-register signal callbacks or terminate
+ * polling loops.
+ */
+ virtual void stop() = 0;
- /**
- * @brief Check the sensor.
- *
- * Implementations should perform an offline (the start
- * method has not been invoked) query of the presence
- * state.
- *
- * @return The state of the sensor.
- */
- virtual bool present() = 0;
+ /**
+ * @brief Check the sensor.
+ *
+ * Implementations should perform an offline (the start
+ * method has not been invoked) query of the presence
+ * state.
+ *
+ * @return The state of the sensor.
+ */
+ virtual bool present() = 0;
- /**
- * @brief Mark the sensor as failed.
- *
- * Implementations should log an an event if the
- * system policy requires it.
- *
- * Provide a default noop implementation.
- */
- virtual void fail() {}
+ /**
+ * @brief Mark the sensor as failed.
+ *
+ * Implementations should log an an event if the
+ * system policy requires it.
+ *
+ * Provide a default noop implementation.
+ */
+ virtual void fail()
+ {}
- friend bool operator==(const PresenceSensor& l, const PresenceSensor& r);
+ friend bool operator==(const PresenceSensor& l, const PresenceSensor& r);
- private:
- /** @brief Unique sensor ID. */
- std::size_t id;
+ private:
+ /** @brief Unique sensor ID. */
+ std::size_t id;
- /** @brief The next unique sensor ID. */
- static std::size_t nextId;
+ /** @brief The next unique sensor ID. */
+ static std::size_t nextId;
};
-inline bool operator==(const PresenceSensor& l, const PresenceSensor &r)
+inline bool operator==(const PresenceSensor& l, const PresenceSensor& r)
{
return l.id == r.id;
}