From 913cde915abbff9e70827e9d57cd440d87c62361 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 3 Jul 2026 23:51:45 +0200 Subject: [PATCH] Fix clang-format --- include/modules/bluetooth.hpp | 3 ++- src/modules/bluetooth.cpp | 15 +++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/include/modules/bluetooth.hpp b/include/modules/bluetooth.hpp index a06d4645..5e03b118 100644 --- a/include/modules/bluetooth.hpp +++ b/include/modules/bluetooth.hpp @@ -63,7 +63,8 @@ class Bluetooth : public ALabel { auto getDeviceGattBatteryLevels(GDBusObject*, std::optional&, std::optional&) -> void; static auto processBatteryServiceCharacteristics(GList*, const std::string&, const std::string&, - const std::string&, std::optional&, + const std::string&, + std::optional&, std::optional&) -> void; auto getDeviceProperties(GDBusObject*, DeviceInfo&) -> bool; auto getControllerProperties(GDBusObject*, ControllerInfo&) -> bool; diff --git a/src/modules/bluetooth.cpp b/src/modules/bluetooth.cpp index 97aad8b2..d54c4d07 100644 --- a/src/modules/bluetooth.cpp +++ b/src/modules/bluetooth.cpp @@ -92,8 +92,9 @@ auto readBatteryCharacteristicValue(GDBusProxy* proxy_char) -> std::optional std::optional(g_variant_get_fixed_array(value_array, &n_elements, sizeof(guchar))); + const auto* data = static_cast( + g_variant_get_fixed_array(value_array, &n_elements, sizeof(guchar))); std::optional result; if (data != nullptr && n_elements > 0) { @@ -136,7 +137,8 @@ auto hasUserDescriptionDescriptor(GList* objects, const std::string& char_path, auto desc_uuid = getOptionalStringProperty(proxy_desc, "UUID"); g_object_unref(proxy_desc); - if (desc_uuid.has_value() && desc_uuid.value().find(user_description_uuid) != std::string::npos) { + if (desc_uuid.has_value() && + desc_uuid.value().find(user_description_uuid) != std::string::npos) { return true; } } @@ -496,7 +498,8 @@ auto waybar::modules::Bluetooth::getDeviceGattBatteryLevels( } processBatteryServiceCharacteristics(objects, service_path, BATTERY_LEVEL_UUID, - USER_DESCRIPTION_UUID, central_battery, peripheral_battery); + USER_DESCRIPTION_UUID, central_battery, + peripheral_battery); } g_list_free_full(objects, g_object_unref);