mirror of
https://github.com/Z3Prover/z3
synced 2026-02-19 15:04:42 +00:00
[WIP] Find and update std::optional usage in code base (#8272)
* Initial plan * Add try_get_value for std::map and use it in var_register.h and dioph_eq.cpp Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Add try_get_value overload for unordered_map with custom hash and use in lar_solver.cpp Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Remove redundant try_get_value template overload Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Remove std::map include and try_get_value overload from lp_utils.h 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
b0313ca80a
commit
c392592831
4 changed files with 47 additions and 47 deletions
|
|
@ -1000,11 +1000,11 @@ namespace lp {
|
|||
|
||||
void find_changed_terms_and_more_changed_rows() {
|
||||
for (unsigned j : m_changed_f_columns) {
|
||||
const auto it = m_columns_to_terms.find(j);
|
||||
if (it != m_columns_to_terms.end())
|
||||
for (unsigned k : it->second) {
|
||||
if (auto terms = try_get_value(m_columns_to_terms, j)) {
|
||||
for (unsigned k : *terms) {
|
||||
mark_term_change(k);
|
||||
}
|
||||
}
|
||||
if (!m_var_register.external_is_used(j))
|
||||
continue;
|
||||
for (const auto& p : m_e_matrix.column(this->lar_solver_to_local(j))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue