clang-format: re-format for clang-19
clang-format-19 isn't compatible with the clang-format-18 output, so we
need to reformat the code with the latest version. A few parameters
in clang-tidy have been deprecated, so adjust the style file
accordingly.
See Ie2f6eb3b043f2d655c9df806815afd7971fd0947 for updated style.
See I88192b41ab7a95599a90915013579608af7bc56f for clang-19 enablement.
Change-Id: I0bad58454a8b9ce41351be80b0f42f09cad89e91
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/.clang-format b/.clang-format
index 28e3328..a75a2c2 100644
--- a/.clang-format
+++ b/.clang-format
@@ -17,9 +17,7 @@
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: true
AllowShortLoopsOnASingleLine: false
-AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
-AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: None
@@ -43,12 +41,14 @@
SplitEmptyRecord: false
SplitEmptyNamespace: false
BreakAfterAttributes: Never
+BreakAfterReturnType: Automatic
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakInheritanceList: AfterColon
BreakStringLiterals: false
+BreakTemplateDeclarations: Yes
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
diff --git a/thresholds.hpp b/thresholds.hpp
index 162e1c2..5fb2947 100644
--- a/thresholds.hpp
+++ b/thresholds.hpp
@@ -26,18 +26,18 @@
static constexpr InterfaceType type = InterfaceType::WARN;
static constexpr const char* envLo = "WARNLO";
static constexpr const char* envHi = "WARNHI";
- static SensorValueType (WarningObject::*const setLo)(SensorValueType);
- static SensorValueType (WarningObject::*const setHi)(SensorValueType);
- static SensorValueType (WarningObject::*const getLo)() const;
- static SensorValueType (WarningObject::*const getHi)() const;
- static bool (WarningObject::*const alarmLo)(bool);
- static bool (WarningObject::*const alarmHi)(bool);
- static bool (WarningObject::*const getAlarmLow)() const;
- static bool (WarningObject::*const getAlarmHigh)() const;
- static void (WarningObject::*const assertLowSignal)(SensorValueType);
- static void (WarningObject::*const assertHighSignal)(SensorValueType);
- static void (WarningObject::*const deassertLowSignal)(SensorValueType);
- static void (WarningObject::*const deassertHighSignal)(SensorValueType);
+ static SensorValueType (WarningObject::* const setLo)(SensorValueType);
+ static SensorValueType (WarningObject::* const setHi)(SensorValueType);
+ static SensorValueType (WarningObject::* const getLo)() const;
+ static SensorValueType (WarningObject::* const getHi)() const;
+ static bool (WarningObject::* const alarmLo)(bool);
+ static bool (WarningObject::* const alarmHi)(bool);
+ static bool (WarningObject::* const getAlarmLow)() const;
+ static bool (WarningObject::* const getAlarmHigh)() const;
+ static void (WarningObject::* const assertLowSignal)(SensorValueType);
+ static void (WarningObject::* const assertHighSignal)(SensorValueType);
+ static void (WarningObject::* const deassertLowSignal)(SensorValueType);
+ static void (WarningObject::* const deassertHighSignal)(SensorValueType);
};
/**@brief Thresholds specialization for critical thresholds. */
@@ -47,18 +47,18 @@
static constexpr InterfaceType type = InterfaceType::CRIT;
static constexpr const char* envLo = "CRITLO";
static constexpr const char* envHi = "CRITHI";
- static SensorValueType (CriticalObject::*const setLo)(SensorValueType);
- static SensorValueType (CriticalObject::*const setHi)(SensorValueType);
- static SensorValueType (CriticalObject::*const getLo)() const;
- static SensorValueType (CriticalObject::*const getHi)() const;
- static bool (CriticalObject::*const alarmLo)(bool);
- static bool (CriticalObject::*const alarmHi)(bool);
- static bool (CriticalObject::*const getAlarmLow)() const;
- static bool (CriticalObject::*const getAlarmHigh)() const;
- static void (CriticalObject::*const assertLowSignal)(SensorValueType);
- static void (CriticalObject::*const assertHighSignal)(SensorValueType);
- static void (CriticalObject::*const deassertLowSignal)(SensorValueType);
- static void (CriticalObject::*const deassertHighSignal)(SensorValueType);
+ static SensorValueType (CriticalObject::* const setLo)(SensorValueType);
+ static SensorValueType (CriticalObject::* const setHi)(SensorValueType);
+ static SensorValueType (CriticalObject::* const getLo)() const;
+ static SensorValueType (CriticalObject::* const getHi)() const;
+ static bool (CriticalObject::* const alarmLo)(bool);
+ static bool (CriticalObject::* const alarmHi)(bool);
+ static bool (CriticalObject::* const getAlarmLow)() const;
+ static bool (CriticalObject::* const getAlarmHigh)() const;
+ static void (CriticalObject::* const assertLowSignal)(SensorValueType);
+ static void (CriticalObject::* const assertHighSignal)(SensorValueType);
+ static void (CriticalObject::* const deassertLowSignal)(SensorValueType);
+ static void (CriticalObject::* const deassertHighSignal)(SensorValueType);
};
/** @brief checkThresholds