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/rpolicy.hpp b/presence/rpolicy.hpp
index 8f7db3e..d596dfa 100644
--- a/presence/rpolicy.hpp
+++ b/presence/rpolicy.hpp
@@ -24,43 +24,44 @@
*/
class RedundancyPolicy
{
- public:
- RedundancyPolicy(const RedundancyPolicy&) = default;
- RedundancyPolicy& operator=(const RedundancyPolicy&) = default;
- RedundancyPolicy(RedundancyPolicy&&) = default;
- RedundancyPolicy& operator=(RedundancyPolicy&&) = default;
- virtual ~RedundancyPolicy() = default;
+ public:
+ RedundancyPolicy(const RedundancyPolicy&) = default;
+ RedundancyPolicy& operator=(const RedundancyPolicy&) = default;
+ RedundancyPolicy(RedundancyPolicy&&) = default;
+ RedundancyPolicy& operator=(RedundancyPolicy&&) = default;
+ virtual ~RedundancyPolicy() = default;
- /**
- * @brief Construct a new Redundancy Policy.
- *
- * @param[in] fan - The fan associated with this policy.
- */
- explicit RedundancyPolicy(const Fan& f) : fan(f) {}
+ /**
+ * @brief Construct a new Redundancy Policy.
+ *
+ * @param[in] fan - The fan associated with this policy.
+ */
+ explicit RedundancyPolicy(const Fan& f) : fan(f)
+ {}
- /**
- * @brief stateChanged
- *
- * Typically invoked by presence sensors to signify
- * a change of presence. Implementations should update
- * the inventory and execute their policy logic.
- *
- * @param[in] present - The new state of the sensor.
- * @param[in] sensor - The sensor that changed state.
- */
- virtual void stateChanged(bool present, PresenceSensor& sensor) = 0;
+ /**
+ * @brief stateChanged
+ *
+ * Typically invoked by presence sensors to signify
+ * a change of presence. Implementations should update
+ * the inventory and execute their policy logic.
+ *
+ * @param[in] present - The new state of the sensor.
+ * @param[in] sensor - The sensor that changed state.
+ */
+ virtual void stateChanged(bool present, PresenceSensor& sensor) = 0;
- /**
- * @brief monitor
- *
- * Implementations should start monitoring the sensors
- * associated with the fan.
- */
- virtual void monitor() = 0;
+ /**
+ * @brief monitor
+ *
+ * Implementations should start monitoring the sensors
+ * associated with the fan.
+ */
+ virtual void monitor() = 0;
- protected:
- /** @brief Fan name and inventory path. */
- const Fan& fan;
+ protected:
+ /** @brief Fan name and inventory path. */
+ const Fan& fan;
};
/**
@@ -78,35 +79,36 @@
template <typename T, typename Policy>
class PolicyAccess : public T
{
- public:
- PolicyAccess() = default;
- PolicyAccess(const PolicyAccess&) = default;
- PolicyAccess& operator=(const PolicyAccess&) = default;
- PolicyAccess(PolicyAccess&&) = default;
- PolicyAccess& operator=(PolicyAccess&&) = default;
- ~PolicyAccess() = default;
+ public:
+ PolicyAccess() = default;
+ PolicyAccess(const PolicyAccess&) = default;
+ PolicyAccess& operator=(const PolicyAccess&) = default;
+ PolicyAccess(PolicyAccess&&) = default;
+ PolicyAccess& operator=(PolicyAccess&&) = default;
+ ~PolicyAccess() = default;
- /**
- * @brief Construct a new PolicyAccess wrapped object.
- *
- * @param[in] index - The array index in Policy.
- * @tparam Args - Forwarded to wrapped type constructor.
- */
- template <typename...Args>
- PolicyAccess(size_t index, Args&&...args) :
- T(std::forward<Args>(args)...), policy(index) {}
+ /**
+ * @brief Construct a new PolicyAccess wrapped object.
+ *
+ * @param[in] index - The array index in Policy.
+ * @tparam Args - Forwarded to wrapped type constructor.
+ */
+ template <typename... Args>
+ PolicyAccess(size_t index, Args&&... args) :
+ T(std::forward<Args>(args)...), policy(index)
+ {}
- private:
- /**
- * @brief Get the associated policy.
- */
- RedundancyPolicy& getPolicy() override
- {
- return *Policy::get()[policy];
- }
+ private:
+ /**
+ * @brief Get the associated policy.
+ */
+ RedundancyPolicy& getPolicy() override
+ {
+ return *Policy::get()[policy];
+ }
- /** The associated policy index. */
- size_t policy;
+ /** The associated policy index. */
+ size_t policy;
};
} // namespace presence
} // namespace fan