mirror of
https://github.com/Z3Prover/z3
synced 2026-02-10 19:05:25 +00:00
Refactor counter::get_max_positive to use std::optional (#8289)
* Initial plan * Refactor counter::get_max_positive to use std::optional Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Fix C++17 compatibility by replacing transform() with has_value()/value() Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Address code review: avoid calling get_max_positive twice 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
6feb3391a2
commit
7f91a3321d
6 changed files with 22 additions and 24 deletions
|
|
@ -486,7 +486,7 @@ namespace datalog {
|
|||
DEBUG_CODE(
|
||||
counter ctr;
|
||||
ctr.count(permutation);
|
||||
SASSERT(permutation.empty() || ctr.get_max_positive()==permutation.size()-1);
|
||||
SASSERT(permutation.empty() || ctr.get_max_positive().value_or(0)==permutation.size()-1);
|
||||
SASSERT(permutation.empty() || ctr.get_positive_count()==permutation.size());
|
||||
);
|
||||
unsigned sz = permutation.size();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue