Start using .clang-format
Used the one from docs/style/cpp.
Change-Id: I3bdc2b353bf18a437266b362d8205b8463a9ce2b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/device.hpp b/device.hpp
index 59cb914..2513506 100644
--- a/device.hpp
+++ b/device.hpp
@@ -16,74 +16,70 @@
*/
class Device
{
- public:
+ public:
+ Device() = delete;
+ virtual ~Device() = default;
+ Device(const Device&) = delete;
+ Device& operator=(const Device&) = delete;
+ Device(Device&&) = default;
+ Device& operator=(Device&&) = default;
- Device() = delete;
- virtual ~Device() = default;
- Device(const Device&) = delete;
- Device& operator=(const Device&) = delete;
- Device(Device&&) = default;
- Device& operator=(Device&&) = default;
+ /**
+ * Constructor
+ *
+ * @param name - the device name
+ * @param inst - the device instance
+ */
+ Device(const std::string& name, size_t inst) : name(name), instance(inst)
+ {
+ }
- /**
- * Constructor
- *
- * @param name - the device name
- * @param inst - the device instance
- */
- Device(const std::string& name, size_t inst) :
- name(name),
- instance(inst)
- {
- }
+ /**
+ * Returns the instance number
+ */
+ inline auto getInstance() const
+ {
+ return instance;
+ }
- /**
- * Returns the instance number
- */
- inline auto getInstance() const
- {
- return instance;
- }
+ /**
+ * Returns the name
+ */
+ inline auto getName() const
+ {
+ return name;
+ }
- /**
- * Returns the name
- */
- inline auto getName() const
- {
- return name;
- }
+ /**
+ * Pure virtual function to analyze an error
+ */
+ virtual void analyze() = 0;
- /**
- * Pure virtual function to analyze an error
- */
- virtual void analyze() = 0;
+ /**
+ * Stubbed virtual function to call when it's known
+ * the chip is in error state. Override if functionality
+ * is required
+ */
+ virtual void onFailure()
+ {
+ }
- /**
- * Stubbed virtual function to call when it's known
- * the chip is in error state. Override if functionality
- * is required
- */
- virtual void onFailure()
- {
- }
+ /**
+ * Pure virtual function to clear faults on the device
+ */
+ virtual void clearFaults() = 0;
- /**
- * Pure virtual function to clear faults on the device
- */
- virtual void clearFaults() = 0;
+ private:
+ /**
+ * the device name
+ */
+ const std::string name;
- private:
-
- /**
- * the device name
- */
- const std::string name;
-
- /**
- * the device instance number
- */
- const size_t instance;
+ /**
+ * the device instance number
+ */
+ const size_t instance;
};
-}
-}
+} // namespace power
+} // namespace witherspoon