mirror of
https://github.com/Z3Prover/z3
synced 2026-01-29 05:18:43 +00:00
Refactor find_probe() to use std::optional (#8334)
* Initial plan * Refactor find_probe() to use std::optional - Updated tactic_manager.h: Changed return type to std::optional<probe_info*> - Updated tactic_manager.cpp: Modified implementation to return std::nullopt or probe pointer - Updated api_tactic.cpp: Changed 2 call sites to use optional checks and dereference - Updated tactic_cmds.cpp: Changed 1 call site to use optional check and dereference - Build verified successfully - Probe functionality tested with Python 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
2ac78b6def
commit
49817bc259
4 changed files with 14 additions and 13 deletions
|
|
@ -70,9 +70,10 @@ simplifier_cmd * tactic_manager::find_simplifier_cmd(symbol const & s) const {
|
|||
return c;
|
||||
}
|
||||
|
||||
probe_info * tactic_manager::find_probe(symbol const & s) const {
|
||||
std::optional<probe_info*> tactic_manager::find_probe(symbol const & s) const {
|
||||
probe_info * p = nullptr;
|
||||
m_name2probe.find(s, p);
|
||||
return p;
|
||||
if (m_name2probe.find(s, p))
|
||||
return p;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue