From c4282cfaccb440b2a2a46c5aa0ae65de9746c85d Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Sat, 19 Mar 2022 19:22:21 +0100 Subject: [PATCH] Made tooltip getDeviceIcon return const string --- include/modules/upower/upower_tooltip.hpp | 2 +- src/modules/upower/upower_tooltip.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/modules/upower/upower_tooltip.hpp b/include/modules/upower/upower_tooltip.hpp index 09f6e60b..9f6f16ea 100644 --- a/include/modules/upower/upower_tooltip.hpp +++ b/include/modules/upower/upower_tooltip.hpp @@ -12,7 +12,7 @@ class UPowerTooltip : public Gtk::Window { private: typedef std::unordered_map Devices; - std::string getDeviceIcon(UpDeviceKind& kind); + const std::string getDeviceIcon(UpDeviceKind& kind); Gtk::Box* contentBox; diff --git a/src/modules/upower/upower_tooltip.cpp b/src/modules/upower/upower_tooltip.cpp index 2bff69c0..7ae3e893 100644 --- a/src/modules/upower/upower_tooltip.cpp +++ b/src/modules/upower/upower_tooltip.cpp @@ -96,7 +96,7 @@ uint UPowerTooltip::updateTooltip(Devices& devices) { return deviceCount; } -std::string UPowerTooltip::getDeviceIcon(UpDeviceKind& kind) { +const std::string UPowerTooltip::getDeviceIcon(UpDeviceKind& kind) { switch (kind) { case UP_DEVICE_KIND_LINE_POWER: return "ac-adapter-symbolic";