Commit 2bb4acf7 authored by Méven Car's avatar Méven Car
Browse files

KCM/Effects: convert a couple C-style cast

Summary: Followup after D26040

Reviewers: ervin, zzag, davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D26286
parent 9b41e935
...@@ -557,7 +557,7 @@ void EffectsModel::defaults() ...@@ -557,7 +557,7 @@ void EffectsModel::defaults()
const auto &effect = m_effects.at(i); const auto &effect = m_effects.at(i);
if (effect.enabledByDefaultFunction && effect.status != Status::EnabledUndeterminded) { if (effect.enabledByDefaultFunction && effect.status != Status::EnabledUndeterminded) {
updateEffectStatus(index(i, 0), Status::EnabledUndeterminded); updateEffectStatus(index(i, 0), Status::EnabledUndeterminded);
} else if ((bool)effect.status != effect.enabledByDefault) { } else if (static_cast<bool>(effect.status) != effect.enabledByDefault) {
updateEffectStatus(index(i, 0), effect.enabledByDefault ? Status::Enabled : Status::Disabled); updateEffectStatus(index(i, 0), effect.enabledByDefault ? Status::Enabled : Status::Disabled);
} }
} }
...@@ -569,7 +569,7 @@ bool EffectsModel::isDefaults() const ...@@ -569,7 +569,7 @@ bool EffectsModel::isDefaults() const
if (effect.enabledByDefaultFunction && effect.status != Status::EnabledUndeterminded) { if (effect.enabledByDefaultFunction && effect.status != Status::EnabledUndeterminded) {
return false; return false;
} }
if ((bool)effect.status != effect.enabledByDefault) { if (static_cast<bool>(effect.status) != effect.enabledByDefault) {
return false; return false;
} }
return true; return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment