3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-29 13:28:44 +00:00

Refactor find_psort_decl() to return std::optional<psort_decl*> (#8339)

* Initial plan

* Refactor find_psort_decl() to return std::optional&lt;psort_decl*&gt;

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:
Copilot 2026-01-25 19:50:33 -08:00 committed by GitHub
parent 49817bc259
commit 445f995c54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 30 additions and 28 deletions

View file

@ -1166,10 +1166,11 @@ func_decl * cmd_context::find_func_decl(symbol const & s, unsigned num_indices,
throw cmd_exception("invalid function declaration reference, unknown indexed function ", s);
}
psort_decl * cmd_context::find_psort_decl(symbol const & s) const {
std::optional<psort_decl*> cmd_context::find_psort_decl(symbol const & s) const {
psort_decl * p = nullptr;
m_psort_decls.find(s, p);
return p;
if (m_psort_decls.find(s, p))
return p;
return std::nullopt;
}