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<psort_decl*> 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
49817bc259
commit
445f995c54
4 changed files with 30 additions and 28 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue