mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
Catch exceptions by const-reference
Exceptions caught by value incur needless cost in C++, most of them can be caught by const-reference, especially as nearly none are actually used. This could allow compiler generate a slightly more efficient code.
This commit is contained in:
parent
b301a59899
commit
cfd0486582
36 changed files with 45 additions and 45 deletions
|
@ -1989,7 +1989,7 @@ namespace algebraic_numbers {
|
|||
TRACE("anum_eval_sign", tout << "all variables are assigned to rationals, value of p: " << r << "\n";);
|
||||
return qm().sign(r);
|
||||
}
|
||||
catch (opt_var2basic::failed) {
|
||||
catch (const opt_var2basic::failed &) {
|
||||
// continue
|
||||
}
|
||||
|
||||
|
|
|
@ -4493,7 +4493,7 @@ namespace polynomial {
|
|||
}
|
||||
#endif
|
||||
}
|
||||
catch (sparse_mgcd_failed) {
|
||||
catch (const sparse_mgcd_failed &) {
|
||||
flet<bool> use_prs(m_use_prs_gcd, false);
|
||||
gcd_prs(u, v, x, r);
|
||||
}
|
||||
|
|
|
@ -183,7 +183,7 @@ class subpaving_tactic : public tactic {
|
|||
process_clause(g.form(i));
|
||||
}
|
||||
}
|
||||
catch (subpaving::exception) {
|
||||
catch (const subpaving::exception &) {
|
||||
throw tactic_exception("failed to internalize goal into subpaving module");
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ class subpaving_tactic : public tactic {
|
|||
try {
|
||||
(*m_ctx)();
|
||||
}
|
||||
catch (subpaving::exception) {
|
||||
catch (const subpaving::exception &) {
|
||||
throw tactic_exception("failed building subpaving tree...");
|
||||
}
|
||||
if (m_display) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue