Update to latest clang format
Update to clang-format-10
Change-Id: I91e46a3b27c7ebd9a4813a19c1a62ac19bc2f0a0
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/src/EntityManager.cpp b/src/EntityManager.cpp
index 98f24b2..3b2b416 100644
--- a/src/EntityManager.cpp
+++ b/src/EntityManager.cpp
@@ -30,13 +30,14 @@
#include <boost/container/flat_map.hpp>
#include <boost/container/flat_set.hpp>
#include <boost/range/iterator_range.hpp>
+#include <nlohmann/json.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+
#include <filesystem>
#include <fstream>
#include <iostream>
-#include <nlohmann/json.hpp>
#include <regex>
-#include <sdbusplus/asio/connection.hpp>
-#include <sdbusplus/asio/object_server.hpp>
#include <variant>
constexpr const char* configurationDirectory = PACKAGE_DIR "configurations";
constexpr const char* schemaDirectory = PACKAGE_DIR "configurations/schemas";
@@ -505,8 +506,7 @@
std::function<void(FoundDeviceT&)>&& callback) :
_probeCommand(probeCommand),
scan(scanPtr), _callback(std::move(callback))
-{
-}
+{}
PerformProbe::~PerformProbe()
{
FoundDeviceT foundDevs;
@@ -1265,8 +1265,7 @@
_missingConfigurations(missingConfigurations),
_configurations(configurations), objServer(objServerIn),
_callback(std::move(callback))
-{
-}
+{}
void PerformScan::run()
{
boost::container::flat_set<std::string> dbusProbeInterfaces;
diff --git a/src/FruDevice.cpp b/src/FruDevice.cpp
index 8eb34a0..7107a96 100644
--- a/src/FruDevice.cpp
+++ b/src/FruDevice.cpp
@@ -21,9 +21,13 @@
#include <sys/inotify.h>
#include <sys/ioctl.h>
-#include <array>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/container/flat_map.hpp>
+#include <nlohmann/json.hpp>
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+
+#include <array>
#include <chrono>
#include <ctime>
#include <filesystem>
@@ -33,10 +37,7 @@
#include <iomanip>
#include <iostream>
#include <limits>
-#include <nlohmann/json.hpp>
#include <regex>
-#include <sdbusplus/asio/connection.hpp>
-#include <sdbusplus/asio/object_server.hpp>
#include <set>
#include <sstream>
#include <string>
@@ -44,7 +45,8 @@
#include <variant>
#include <vector>
-extern "C" {
+extern "C"
+{
#include <i2c/smbus.h>
#include <linux/i2c-dev.h>
}
@@ -745,16 +747,15 @@
}
// this class allows an async response after all i2c devices are discovered
-struct FindDevicesWithCallback
- : std::enable_shared_from_this<FindDevicesWithCallback>
+struct FindDevicesWithCallback :
+ std::enable_shared_from_this<FindDevicesWithCallback>
{
FindDevicesWithCallback(const std::vector<fs::path>& i2cBuses,
BusMap& busmap,
std::function<void(void)>&& callback) :
_i2cBuses(i2cBuses),
_busMap(busmap), _callback(std::move(callback))
- {
- }
+ {}
~FindDevicesWithCallback()
{
_callback();
diff --git a/src/Overlay.cpp b/src/Overlay.cpp
index a625537..edd00f7 100644
--- a/src/Overlay.cpp
+++ b/src/Overlay.cpp
@@ -23,10 +23,11 @@
#include <boost/container/flat_map.hpp>
#include <boost/container/flat_set.hpp>
#include <boost/process/child.hpp>
+#include <nlohmann/json.hpp>
+
#include <filesystem>
#include <iomanip>
#include <iostream>
-#include <nlohmann/json.hpp>
#include <regex>
#include <string>
diff --git a/src/Utils.cpp b/src/Utils.cpp
index c92aabc..4e9d4a1 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -25,15 +25,16 @@
#include <boost/algorithm/string/split.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/lexical_cast.hpp>
-#include <filesystem>
-#include <fstream>
-#include <regex>
#include <sdbusplus/bus/match.hpp>
#include <valijson/adapters/nlohmann_json_adapter.hpp>
#include <valijson/schema.hpp>
#include <valijson/schema_parser.hpp>
#include <valijson/validator.hpp>
+#include <filesystem>
+#include <fstream>
+#include <regex>
+
constexpr const char* templateChar = "$";
namespace fs = std::filesystem;
@@ -372,11 +373,9 @@
}
}
catch (std::invalid_argument&)
- {
- }
+ {}
catch (std::out_of_range&)
- {
- }
+ {}
}
// non-hex numbers
else
@@ -387,8 +386,7 @@
keyPair.value() = temp;
}
catch (boost::bad_lexical_cast&)
- {
- }
+ {}
}
return ret;
}