clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.
Change-Id: I3942bdbbb0fc2d46d755a74f481bb44fa63dc486
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/presence/gpio_presence.cpp b/presence/gpio_presence.cpp
index e473fea..c6e26b5 100644
--- a/presence/gpio_presence.cpp
+++ b/presence/gpio_presence.cpp
@@ -5,11 +5,12 @@
#include <fcntl.h>
#include <libevdev/libevdev.h>
-#include <fstream>
#include <phosphor-logging/elog-errors.hpp>
#include <phosphor-logging/elog.hpp>
#include <phosphor-logging/log.hpp>
+#include <fstream>
+
namespace phosphor
{
namespace gpio
@@ -63,8 +64,8 @@
{
auto present = false;
auto value = static_cast<int>(0);
- auto fetch_rc =
- libevdev_fetch_event_value(devicePtr.get(), EV_KEY, key, &value);
+ auto fetch_rc = libevdev_fetch_event_value(devicePtr.get(), EV_KEY, key,
+ &value);
if (0 == fetch_rc)
{
log<level::ERR>("Device does not support event type",
@@ -92,11 +93,9 @@
// Analyzes the GPIO event
void Presence::analyzeEvent()
{
-
// Data returned
struct input_event ev
- {
- };
+ {};
int rc = 0;
// While testing, observed that not having a loop here was leading
diff --git a/presence/gpio_presence.hpp b/presence/gpio_presence.hpp
index 4b9b24c..b72e84e 100644
--- a/presence/gpio_presence.hpp
+++ b/presence/gpio_presence.hpp
@@ -3,9 +3,10 @@
#include <systemd/sd-event.h>
+#include <sdbusplus/bus.hpp>
+
#include <cstdlib>
#include <experimental/filesystem>
-#include <sdbusplus/bus.hpp>
#include <string>
namespace phosphor
@@ -29,7 +30,6 @@
*/
class Presence : public Evdev
{
-
using Property = std::string;
using Value = std::variant<bool, std::string>;
// Association between property and its value
diff --git a/presence/main.cpp b/presence/main.cpp
index eace07e..56ab8a1 100644
--- a/presence/main.cpp
+++ b/presence/main.cpp
@@ -3,9 +3,10 @@
#include <systemd/sd-event.h>
-#include <iostream>
#include <phosphor-logging/log.hpp>
+#include <iostream>
+
using namespace phosphor::logging;
using namespace phosphor::gpio;
using namespace phosphor::gpio::presence;