fix: lint
This commit is contained in:
parent
e8a2882796
commit
0bc43c1aa7
|
@ -51,8 +51,8 @@ class Clock final : public ALabel {
|
|||
day cldBaseDay_{0}; // calendar Cached day. Is used when today is changing(midnight)
|
||||
std::string cldText_{""}; // calendar text to print
|
||||
CldMode cldMode_{CldMode::MONTH};
|
||||
auto get_calendar(const year_month_day& today, const year_month_day& ymd, const time_zone* tz)
|
||||
-> const std::string;
|
||||
auto get_calendar(const year_month_day& today, const year_month_day& ymd,
|
||||
const time_zone* tz) -> const std::string;
|
||||
|
||||
// get local time zone
|
||||
auto local_zone() -> const time_zone*;
|
||||
|
|
|
@ -622,8 +622,8 @@ inline auto convertInto(std::string const &source, bool &target) -> ParserResult
|
|||
}
|
||||
#ifdef CLARA_CONFIG_OPTIONAL_TYPE
|
||||
template <typename T>
|
||||
inline auto convertInto(std::string const &source, CLARA_CONFIG_OPTIONAL_TYPE<T> &target)
|
||||
-> ParserResult {
|
||||
inline auto convertInto(std::string const &source,
|
||||
CLARA_CONFIG_OPTIONAL_TYPE<T> &target) -> ParserResult {
|
||||
T temp;
|
||||
auto result = convertInto(source, temp);
|
||||
if (result) target = std::move(temp);
|
||||
|
@ -751,8 +751,8 @@ class ParserBase {
|
|||
public:
|
||||
virtual ~ParserBase() = default;
|
||||
virtual auto validate() const -> Result { return Result::ok(); }
|
||||
virtual auto parse(std::string const &exeName, TokenStream const &tokens) const
|
||||
-> InternalParseResult = 0;
|
||||
virtual auto parse(std::string const &exeName,
|
||||
TokenStream const &tokens) const -> InternalParseResult = 0;
|
||||
virtual auto cardinality() const -> size_t { return 1; }
|
||||
|
||||
auto parse(Args const &args) const -> InternalParseResult {
|
||||
|
@ -1098,8 +1098,8 @@ struct Parser : ParserBase {
|
|||
|
||||
using ParserBase::parse;
|
||||
|
||||
auto parse(std::string const &exeName, TokenStream const &tokens) const
|
||||
-> InternalParseResult override {
|
||||
auto parse(std::string const &exeName,
|
||||
TokenStream const &tokens) const -> InternalParseResult override {
|
||||
struct ParserInfo {
|
||||
ParserBase const *parser = nullptr;
|
||||
size_t count = 0;
|
||||
|
|
|
@ -49,8 +49,8 @@ auto getBoolProperty(GDBusProxy* proxy, const char* property_name) -> bool {
|
|||
return false;
|
||||
}
|
||||
|
||||
auto getOptionalStringProperty(GDBusProxy* proxy, const char* property_name)
|
||||
-> std::optional<std::string> {
|
||||
auto getOptionalStringProperty(GDBusProxy* proxy,
|
||||
const char* property_name) -> std::optional<std::string> {
|
||||
auto gvar = g_dbus_proxy_get_cached_property(proxy, property_name);
|
||||
if (gvar) {
|
||||
std::string property_value = g_variant_get_string(gvar, NULL);
|
||||
|
@ -303,8 +303,8 @@ auto waybar::modules::Bluetooth::onInterfaceAddedOrRemoved(GDBusObjectManager* m
|
|||
|
||||
auto waybar::modules::Bluetooth::onInterfaceProxyPropertiesChanged(
|
||||
GDBusObjectManagerClient* manager, GDBusObjectProxy* object_proxy, GDBusProxy* interface_proxy,
|
||||
GVariant* changed_properties, const gchar* const* invalidated_properties, gpointer user_data)
|
||||
-> void {
|
||||
GVariant* changed_properties, const gchar* const* invalidated_properties,
|
||||
gpointer user_data) -> void {
|
||||
std::string interface_name = g_dbus_proxy_get_interface_name(interface_proxy);
|
||||
std::string object_path = g_dbus_object_get_object_path(G_DBUS_OBJECT(object_proxy));
|
||||
|
||||
|
@ -348,8 +348,8 @@ auto waybar::modules::Bluetooth::getDeviceBatteryPercentage(GDBusObject* object)
|
|||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto waybar::modules::Bluetooth::getDeviceProperties(GDBusObject* object, DeviceInfo& device_info)
|
||||
-> bool {
|
||||
auto waybar::modules::Bluetooth::getDeviceProperties(GDBusObject* object,
|
||||
DeviceInfo& device_info) -> bool {
|
||||
GDBusProxy* proxy_device = G_DBUS_PROXY(g_dbus_object_get_interface(object, "org.bluez.Device1"));
|
||||
|
||||
if (proxy_device != NULL) {
|
||||
|
@ -415,9 +415,8 @@ auto waybar::modules::Bluetooth::findCurController() -> std::optional<Controller
|
|||
return controller_info;
|
||||
}
|
||||
|
||||
auto waybar::modules::Bluetooth::findConnectedDevices(const std::string& cur_controller_path,
|
||||
std::vector<DeviceInfo>& connected_devices)
|
||||
-> void {
|
||||
auto waybar::modules::Bluetooth::findConnectedDevices(
|
||||
const std::string& cur_controller_path, std::vector<DeviceInfo>& connected_devices) -> void {
|
||||
GList* objects = g_dbus_object_manager_get_objects(manager_.get());
|
||||
for (GList* l = objects; l != NULL; l = l->next) {
|
||||
GDBusObject* object = G_DBUS_OBJECT(l->data);
|
||||
|
|
|
@ -16,8 +16,7 @@ std::vector<std::tuple<size_t, size_t>> waybar::modules::CpuUsage::parseCpuinfo(
|
|||
}
|
||||
std::stringstream sline(line.substr(5));
|
||||
std::vector<size_t> times;
|
||||
for (size_t time = 0; sline >> time; times.push_back(time))
|
||||
;
|
||||
for (size_t time = 0; sline >> time; times.push_back(time));
|
||||
|
||||
size_t idle_time = 0;
|
||||
size_t total_time = 0;
|
||||
|
|
|
@ -591,8 +591,8 @@ auto Workspaces::populateIconsMap(const Json::Value &formatIcons) -> void {
|
|||
m_iconsMap.emplace("", "");
|
||||
}
|
||||
|
||||
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key, bool &member)
|
||||
-> void {
|
||||
auto Workspaces::populateBoolConfig(const Json::Value &config, const std::string &key,
|
||||
bool &member) -> void {
|
||||
auto configValue = config[key];
|
||||
if (configValue.isBool()) {
|
||||
member = configValue.asBool();
|
||||
|
|
|
@ -118,8 +118,8 @@ auto WorkspaceManager::sort_workspaces() -> void {
|
|||
}
|
||||
}
|
||||
|
||||
auto WorkspaceManager::register_manager(wl_registry *registry, uint32_t name, uint32_t version)
|
||||
-> void {
|
||||
auto WorkspaceManager::register_manager(wl_registry *registry, uint32_t name,
|
||||
uint32_t version) -> void {
|
||||
if (workspace_manager_) {
|
||||
spdlog::warn("Register workspace manager again although already registered!");
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue