fix: lint
This commit is contained in:
@ -30,7 +30,9 @@ waybar::modules::Clock::Clock(const std::string& id, const Json::Value& config)
|
|||||||
cldMonShift_{year(1900) / January},
|
cldMonShift_{year(1900) / January},
|
||||||
tzInTooltip_{m_tlpFmt_.find("{" + kTZPlaceholder + "}") != std::string::npos},
|
tzInTooltip_{m_tlpFmt_.find("{" + kTZPlaceholder + "}") != std::string::npos},
|
||||||
tzCurrIdx_{0},
|
tzCurrIdx_{0},
|
||||||
tzTooltipFormat_{config_["timezone-tooltip-format"].isString() ? config_["timezone-tooltip-format"].asString() : ""},
|
tzTooltipFormat_{config_["timezone-tooltip-format"].isString()
|
||||||
|
? config_["timezone-tooltip-format"].asString()
|
||||||
|
: ""},
|
||||||
ordInTooltip_{m_tlpFmt_.find("{" + kOrdPlaceholder + "}") != std::string::npos} {
|
ordInTooltip_{m_tlpFmt_.find("{" + kOrdPlaceholder + "}") != std::string::npos} {
|
||||||
m_tlpText_ = m_tlpFmt_;
|
m_tlpText_ = m_tlpFmt_;
|
||||||
|
|
||||||
|
|||||||
@ -16,10 +16,11 @@ waybar::modules::Image::Image(const std::string& id, const Json::Value& config)
|
|||||||
|
|
||||||
interval_ = config_["interval"] == "once"
|
interval_ = config_["interval"] == "once"
|
||||||
? std::chrono::milliseconds::max()
|
? std::chrono::milliseconds::max()
|
||||||
: std::chrono::milliseconds(
|
: std::chrono::milliseconds(std::max(
|
||||||
std::max(1L, // Minimum 1ms due to millisecond precision
|
1L, // Minimum 1ms due to millisecond precision
|
||||||
static_cast<long>(
|
static_cast<long>(
|
||||||
(config_["interval"].isNumeric() ? config_["interval"].asDouble() : 0) * 1000)));
|
(config_["interval"].isNumeric() ? config_["interval"].asDouble() : 0) *
|
||||||
|
1000)));
|
||||||
|
|
||||||
if (size_ == 0) {
|
if (size_ == 0) {
|
||||||
size_ = 16;
|
size_ = 16;
|
||||||
|
|||||||
Reference in New Issue
Block a user