mirror of
https://github.com/Z3Prover/z3
synced 2026-01-28 12:58:43 +00:00
Refactor pb_rewriter to use structured bindings for expression/coefficient pairs (#8380)
* Initial plan * Refactor pb_rewriter to use C++17 structured bindings Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
01948e168b
commit
ffa8ef4cee
1 changed files with 5 additions and 5 deletions
|
|
@ -251,11 +251,11 @@ br_status pb_rewriter::mk_app_core(func_decl * f, unsigned num_args, expr * cons
|
|||
rational slack(0);
|
||||
m_args.reset();
|
||||
m_coeffs.reset();
|
||||
for (auto const& kv : vec) {
|
||||
m_args.push_back(kv.first);
|
||||
m_coeffs.push_back(kv.second);
|
||||
SASSERT(kv.second.is_pos());
|
||||
slack += kv.second;
|
||||
for (auto const& [e, coeff] : vec) {
|
||||
m_args.push_back(e);
|
||||
m_coeffs.push_back(coeff);
|
||||
SASSERT(coeff.is_pos());
|
||||
slack += coeff;
|
||||
all_unit &= m_coeffs.back().is_one();
|
||||
}
|
||||
if (is_eq) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue