Skip to content

Commit

Permalink
Merge branch 'release/0.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
vector-of-bool committed Dec 8, 2019
2 parents d19f04d + 919d1b2 commit c96f2d9
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 193 deletions.
2 changes: 1 addition & 1 deletion package.dds
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Name: pubgrub
Version: 0.1.1
Version: 0.1.2

Test-Driver: Catch-Main
18 changes: 9 additions & 9 deletions src/pubgrub/incompatibility.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ class incompatibility {
return pos->key() != term.key();
});
assert(pos != subseq_end);
*pos = std::reduce(std::next(pos),
subseq_end,
*pos,
[](const term_type& lhs, const term_type& rhs) -> term_type {
assert(keys_equivalent(lhs.key(), rhs.key()));
auto un = lhs.intersection(rhs);
assert(un);
return *un;
});
*pos = std::accumulate(std::next(pos),
subseq_end,
*pos,
[](const term_type& lhs, const term_type& rhs) -> term_type {
assert(keys_equivalent(lhs.key(), rhs.key()));
auto un = lhs.intersection(rhs);
assert(un);
return *un;
});
return _terms.erase(std::next(pos), subseq_end);
}

Expand Down
15 changes: 7 additions & 8 deletions src/pubgrub/solve.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,13 @@ struct solver {
const ic_type& new_ic = ics.record(
ic_type{{term_type{*cand_req}, term_type{std::move(req), false}}, alloc});
assert(new_ic.terms().size() == 2);
found_conflict = found_conflict || std::all_of(
new_ic.terms().cbegin(),
new_ic.terms().cend(),
[&](const term_type& ic_term) {
return ic_term.key() == key_of(*cand_req)
|| sln.satisfies(ic_term);
}
);
found_conflict = found_conflict
|| std::all_of(new_ic.terms().cbegin(),
new_ic.terms().cend(),
[&](const term_type& ic_term) {
return ic_term.key() == key_of(*cand_req)
|| sln.satisfies(ic_term);
});
}

if (!found_conflict) {
Expand Down
Loading

0 comments on commit c96f2d9

Please sign in to comment.