3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 00:55: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:
Michał Janiszewski 2018-10-12 21:15:31 +02:00
parent b301a59899
commit cfd0486582
36 changed files with 45 additions and 45 deletions

View file

@ -61,7 +61,7 @@ namespace qe {
project_nonrec(model, vars, lits);
}
}
catch (cant_project) {
catch (const cant_project &) {
TRACE("qe", tout << "can't project:" << mk_pp(var, m) << "\n";);
return false;
}

View file

@ -62,7 +62,7 @@ namespace qe {
is_pure_ns::proc v(is_var);
quick_for_each_expr(v, e);
}
catch (is_pure_ns::found) {
catch (const is_pure_ns::found &) {
return false;
}
return true;