mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
add disambiguation, avoid uninitialzed variable passing in debug mode
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
445a2280d3
commit
d43c12413d
|
@ -1692,7 +1692,6 @@ public:
|
||||||
bool explanation_is_correct(const vector<std::pair<mpq, unsigned>>& explanation) const {
|
bool explanation_is_correct(const vector<std::pair<mpq, unsigned>>& explanation) const {
|
||||||
#ifdef LEAN_DEBUG
|
#ifdef LEAN_DEBUG
|
||||||
lconstraint_kind kind;
|
lconstraint_kind kind;
|
||||||
lean_assert(the_relations_are_of_same_type(explanation, kind));
|
|
||||||
lean_assert(the_left_sides_sum_to_zero(explanation));
|
lean_assert(the_left_sides_sum_to_zero(explanation));
|
||||||
mpq rs = sum_of_right_sides_of_explanation(explanation);
|
mpq rs = sum_of_right_sides_of_explanation(explanation);
|
||||||
switch (kind) {
|
switch (kind) {
|
||||||
|
|
|
@ -180,7 +180,7 @@ void random_updater::add_value(numeric_pair<mpq>& v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void random_updater::remove_value(numeric_pair<mpq>& v) {
|
void random_updater::remove_value(numeric_pair<mpq>& v) {
|
||||||
auto it = m_values.find(v);
|
std::unordered_map<numeric_pair<mpq>, unsigned>::iterator it = m_values.find(v);
|
||||||
lean_assert(it != m_values.end());
|
lean_assert(it != m_values.end());
|
||||||
it->second--;
|
it->second--;
|
||||||
if (it->second == 0)
|
if (it->second == 0)
|
||||||
|
|
Loading…
Reference in a new issue