Update to latest clang-format
Refer:https://github.com/openbmc/docs/blob/ac5d544553934f8083c61c5986a1420261bc8a4c/style/cpp/.clang-format
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I80f24d12c18074b3294b158c2a2a515d548aa0e1
diff --git a/.clang-format b/.clang-format
index cab3139..79a474d 100644
--- a/.clang-format
+++ b/.clang-format
@@ -49,6 +49,7 @@
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
+DeriveLineEnding: false
DerivePointerAlignment: false
PointerAlignment: Left
DisableFormat: false
@@ -76,7 +77,7 @@
IndentCaseLabels: true
IndentWidth: 4
IndentWrappedFunctionNames: true
-KeepEmptyLinesAtTheStartOfBlocks: true
+KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
@@ -110,6 +111,6 @@
SpacesInSquareBrackets: false
Standard: Latest
TabWidth: 4
+UseCRLF: false
UseTab: Never
...
-
diff --git a/dbusUtils.hpp b/dbusUtils.hpp
index 52d19c1..0495ceb 100644
--- a/dbusUtils.hpp
+++ b/dbusUtils.hpp
@@ -57,7 +57,6 @@
const std::string& path, const std::string& intf,
const std::string& property)
{
-
Value value;
auto method =
diff --git a/virtualSensor.cpp b/virtualSensor.cpp
index 82cd5ab..bf95bc4 100644
--- a/virtualSensor.cpp
+++ b/virtualSensor.cpp
@@ -257,7 +257,6 @@
void VirtualSensor::initVirtualSensor(const Json& sensorConfig,
const std::string& objPath)
{
-
static const Json empty{};
/* Get threshold values if defined in config */
@@ -942,7 +941,6 @@
*/
int main()
{
-
// Get a default event loop
auto event = sdeventplus::Event::get_default();