AIconLabel: make regex static and initialize label_contains_icon
Compile the icon-extraction std::regex objects once via static locals instead of rebuilding them on every update() of every AIconLabel-derived module (custom, mpris, ...). Also default-initialize label_contains_icon to false at its declaration.
This commit is contained in:
@@ -21,7 +21,7 @@ class AIconLabel : public ALabel {
|
||||
Gtk::Box box_;
|
||||
unsigned app_icon_size_{24};
|
||||
|
||||
bool label_contains_icon;
|
||||
bool label_contains_icon{false};
|
||||
|
||||
bool iconEnabled() const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user