refactor: lint

This commit is contained in:
Alex
2022-04-06 08:37:19 +02:00
parent 168ba2ca5b
commit f2fcadbf62
99 changed files with 3173 additions and 3512 deletions

View File

@ -35,7 +35,7 @@ uint UPowerTooltip::updateTooltip(Devices& devices) {
uint deviceCount = 0;
// Adds all valid devices
for (auto pair : devices) {
UpDevice* device = pair.second;
UpDevice* device = pair.second;
std::string objectPath = pair.first;
if (!G_IS_OBJECT(device)) continue;
@ -43,23 +43,13 @@ uint UPowerTooltip::updateTooltip(Devices& devices) {
Gtk::Box* box = new Gtk::Box(Gtk::ORIENTATION_HORIZONTAL, tooltipSpacing);
UpDeviceKind kind;
double percentage;
gchar* native_path;
gchar* model;
gchar* icon_name;
double percentage;
gchar* native_path;
gchar* model;
gchar* icon_name;
g_object_get(device,
"kind",
&kind,
"percentage",
&percentage,
"native-path",
&native_path,
"model",
&model,
"icon-name",
&icon_name,
NULL);
g_object_get(device, "kind", &kind, "percentage", &percentage, "native-path", &native_path,
"model", &model, "icon-name", &icon_name, NULL);
// Skip Line_Power and BAT0 devices
if (kind == UP_DEVICE_KIND_LINE_POWER || native_path == NULL || strlen(native_path) == 0 ||