Skip to content

Commit

Permalink
Apply suggested changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
boehmseb committed Oct 23, 2023
1 parent 28bddd7 commit 1e5aa2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/Solver/Z3Solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ Result<SolverErrorCode, bool> Z3Solver::hasValidConfigurations() {

Result<SolverErrorCode, std::unique_ptr<vara::feature::Configuration>>
Z3Solver::getNextConfiguration() {
if (!Dirty) {
Dirty = true;
} else {
if (Dirty) {
excludeCurrentConfiguration();
} else {
Dirty = true;
}

return getCurrentConfiguration();
Expand Down Expand Up @@ -241,7 +241,7 @@ Result<SolverErrorCode> Z3Solver::excludeCurrentConfiguration() {
}
const z3::model M = Solver->get_model();
z3::expr Expr = Context.bool_val(false);
for (auto const &Entry : OptionToVariableMapping) {
for (const auto &Entry : OptionToVariableMapping) {
const z3::expr OptionExpr = *Entry.getValue();
const z3::expr Value = M.eval(OptionExpr, true);
if (Value.is_bool()) {
Expand All @@ -266,7 +266,7 @@ Z3Solver::getCurrentConfiguration() {
const z3::model M = Solver->get_model();
auto Config = std::make_unique<vara::feature::Configuration>();

for (auto const &Entry : OptionToVariableMapping) {
for (const auto &Entry : OptionToVariableMapping) {
const z3::expr OptionExpr = *Entry.getValue();
const z3::expr Value = M.eval(OptionExpr, true);
Config->setConfigurationOption(Entry.getKey(),
Expand Down

0 comments on commit 1e5aa2b

Please sign in to comment.