refactor(modules): const bar

This commit is contained in:
Alexis
2018-12-01 00:10:41 +01:00
parent 281bab4943
commit 691fb88057
11 changed files with 17 additions and 17 deletions

View File

@ -2,8 +2,8 @@
#include <iostream>
waybar::modules::SNI::Tray::Tray(Bar& bar, const Json::Value &config)
: config_(config), watcher_(), host_(bar.nb_tray_hosts, config,
waybar::modules::SNI::Tray::Tray(const Bar& bar, const Json::Value &config)
: config_(config), watcher_(), host_(nb_hosts_, config,
std::bind(&Tray::onAdd, this, std::placeholders::_1),
std::bind(&Tray::onRemove, this, std::placeholders::_1))
{
@ -11,7 +11,7 @@ waybar::modules::SNI::Tray::Tray(Bar& bar, const Json::Value &config)
if (config_["spacing"].isUInt()) {
box_.set_spacing(config_["spacing"].asUInt());
}
bar.nb_tray_hosts += 1;
nb_hosts_ += 1;
}
void waybar::modules::SNI::Tray::onAdd(std::unique_ptr<Item>& item)