mirror of
https://github.com/Z3Prover/z3
synced 2025-05-08 00:05:46 +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
|
@ -476,7 +476,7 @@ struct check_logic::imp {
|
|||
quick_for_each_expr(*this, n);
|
||||
return true;
|
||||
}
|
||||
catch (failed) {
|
||||
catch (const failed &) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -495,7 +495,7 @@ struct check_logic::imp {
|
|||
check_sort(f->get_range());
|
||||
return true;
|
||||
}
|
||||
catch (failed) {
|
||||
catch (const failed &) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1833,7 +1833,7 @@ void cmd_context::validate_model() {
|
|||
for_each_expr(contains_underspecified, a);
|
||||
for_each_expr(contains_underspecified, r);
|
||||
}
|
||||
catch (contains_underspecified_op_proc::found) {
|
||||
catch (const contains_underspecified_op_proc::found &) {
|
||||
continue;
|
||||
}
|
||||
TRACE("model_validate", model_smt2_pp(tout, *this, *md, 0););
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue