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
|
@ -261,7 +261,7 @@ namespace smt {
|
|||
try {
|
||||
for_each_expr(*this, m_visited, n);
|
||||
}
|
||||
catch (is_model_value) {
|
||||
catch (const is_model_value &) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace smt {
|
|||
try {
|
||||
for_each_expr(*this, m_visited, n);
|
||||
}
|
||||
catch (is_model_value) {
|
||||
catch (const is_model_value &) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -2892,7 +2892,7 @@ namespace smt {
|
|||
try {
|
||||
for_each_expr(oc, m_visited, def);
|
||||
}
|
||||
catch (occurs) {
|
||||
catch (const occurs &) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -2981,7 +2981,7 @@ namespace smt {
|
|||
try {
|
||||
process(f);
|
||||
}
|
||||
catch (found_satisfied_subset) {
|
||||
catch (const found_satisfied_subset &) {
|
||||
set_interp();
|
||||
copy_non_satisfied(qcandidates, new_qs);
|
||||
return true;
|
||||
|
|
|
@ -41,7 +41,7 @@ bool uses_theory(expr * n, family_id fid, expr_mark & visited) {
|
|||
try {
|
||||
for_each_expr(p, visited, n);
|
||||
}
|
||||
catch (uses_theory_ns::found) {
|
||||
catch (const uses_theory_ns::found &) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue