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: I152f141a5e8343b92b5ce81d3ca16eec77b5606b
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/control/zone.hpp b/control/zone.hpp
index 3decb32..183bd78 100644
--- a/control/zone.hpp
+++ b/control/zone.hpp
@@ -241,23 +241,23 @@
std::optional<T> value;
std::visit(
[&value](auto&& val) {
- // If the type configured is int64, but the sensor value
- // property's type is double, scale it by 1000 and return
- // the value as an int64 as configured.
- using V = std::decay_t<decltype(val)>;
- if constexpr (std::is_same_v<T, int64_t> &&
- std::is_same_v<V, double>)
- {
- val = val * 1000;
- value = std::lround(val);
- }
- // If the type configured matches the sensor value
- // property's type, just return the value as its
- // given type.
- else if constexpr (std::is_same_v<T, V>)
- {
- value = val;
- }
+ // If the type configured is int64, but the sensor value
+ // property's type is double, scale it by 1000 and return
+ // the value as an int64 as configured.
+ using V = std::decay_t<decltype(val)>;
+ if constexpr (std::is_same_v<T, int64_t> &&
+ std::is_same_v<V, double>)
+ {
+ val = val * 1000;
+ value = std::lround(val);
+ }
+ // If the type configured matches the sensor value
+ // property's type, just return the value as its
+ // given type.
+ else if constexpr (std::is_same_v<T, V>)
+ {
+ value = val;
+ }
},
variant);
@@ -628,11 +628,11 @@
// type(T) is available on this interface and read it
std::visit(
[&value](auto&& val) {
- using V = std::decay_t<decltype(val)>;
- if constexpr (std::is_same_v<T, V>)
- {
- value = val;
- }
+ using V = std::decay_t<decltype(val)>;
+ if constexpr (std::is_same_v<T, V>)
+ {
+ value = val;
+ }
},
var);