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: Id6760866dedbaeafd83ea8ef2e0303e30b8955aa
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/file.hpp b/file.hpp
index bc5450f..9ad5213 100644
--- a/file.hpp
+++ b/file.hpp
@@ -10,39 +10,39 @@
*/
class FileDescriptor
{
- private:
- /** @brief File descriptor for the gpio input device */
- int fd = -1;
+ private:
+ /** @brief File descriptor for the gpio input device */
+ int fd = -1;
- public:
- FileDescriptor() = delete;
- FileDescriptor(const FileDescriptor&) = delete;
- FileDescriptor& operator=(const FileDescriptor&) = delete;
- FileDescriptor(FileDescriptor&&) = delete;
- FileDescriptor& operator=(FileDescriptor&&) = delete;
+ public:
+ FileDescriptor() = delete;
+ FileDescriptor(const FileDescriptor&) = delete;
+ FileDescriptor& operator=(const FileDescriptor&) = delete;
+ FileDescriptor(FileDescriptor&&) = delete;
+ FileDescriptor& operator=(FileDescriptor&&) = delete;
- /** @brief Saves File descriptor and uses it to do file operation
- *
- * @param[in] fd - File descriptor
- */
- FileDescriptor(int fd) : fd(fd)
+ /** @brief Saves File descriptor and uses it to do file operation
+ *
+ * @param[in] fd - File descriptor
+ */
+ FileDescriptor(int fd) : fd(fd)
+ {
+ // Nothing
+ }
+
+ ~FileDescriptor()
+ {
+ if (fd >= 0)
{
- // Nothing
+ close(fd);
}
+ }
- ~FileDescriptor()
- {
- if (fd >=0)
- {
- close(fd);
- }
- }
-
- int operator()()
- {
- return fd;
- }
+ int operator()()
+ {
+ return fd;
+ }
};
} // namespace occ
-} // namespace open-power
+} // namespace open_power