mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Simplify Rule
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
parent
79b7e277f1
commit
3ba9483011
5 changed files with 73 additions and 119 deletions
|
|
@ -242,13 +242,13 @@ bool Library::isActive(const RuntimeContext& runtimeContext) const
|
|||
if (m_rules.empty()) {
|
||||
result = true;
|
||||
} else {
|
||||
RuleAction ruleResult = Disallow;
|
||||
Rule::Action ruleResult = Rule::Disallow;
|
||||
for (auto rule : m_rules) {
|
||||
RuleAction temp = rule->apply(this, runtimeContext);
|
||||
if (temp != Defer)
|
||||
Rule::Action temp = rule.apply(runtimeContext);
|
||||
if (temp != Rule::Defer)
|
||||
ruleResult = temp;
|
||||
}
|
||||
result = result && (ruleResult == Allow);
|
||||
result = result && (ruleResult == Rule::Allow);
|
||||
}
|
||||
if (isNative()) {
|
||||
result = result && !getCompatibleNative(runtimeContext).isNull();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue