mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 01:25: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
|
@ -87,7 +87,7 @@ namespace sat {
|
|||
try {
|
||||
return apply_rec(arg1, arg2, op);
|
||||
}
|
||||
catch (mem_out) {
|
||||
catch (const mem_out &) {
|
||||
try_reorder();
|
||||
if (!first) throw;
|
||||
first = false;
|
||||
|
@ -546,7 +546,7 @@ namespace sat {
|
|||
try {
|
||||
return bdd(mk_not_rec(b.root), this);
|
||||
}
|
||||
catch (mem_out) {
|
||||
catch (const mem_out &) {
|
||||
try_reorder();
|
||||
if (!first) throw;
|
||||
first = false;
|
||||
|
@ -575,7 +575,7 @@ namespace sat {
|
|||
try {
|
||||
return bdd(mk_ite_rec(c.root, t.root, e.root), this);
|
||||
}
|
||||
catch (mem_out) {
|
||||
catch (const mem_out &) {
|
||||
try_reorder();
|
||||
if (!first) throw;
|
||||
first = false;
|
||||
|
|
|
@ -1147,7 +1147,7 @@ namespace sat {
|
|||
|
||||
}
|
||||
}
|
||||
catch (abort_solver) {
|
||||
catch (const abort_solver &) {
|
||||
m_reason_unknown = "sat.giveup";
|
||||
return l_undef;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue