From a57b74bd58a72dba6a0b7ca0f1ff01b0ddeb0c43 Mon Sep 17 00:00:00 2001 From: Chuyue Sun Date: Thu, 1 Aug 2024 23:50:39 +0000 Subject: [PATCH] remove one invariant --- src/util/heap.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util/heap.h b/src/util/heap.h index 3bee2fe9f..71cafeeb8 100644 --- a/src/util/heap.h +++ b/src/util/heap.h @@ -61,12 +61,12 @@ class heap : private LT { return false; } - // All indices in m_value2indices that are not used in m_values should be 0 - for (int val = 0; val < static_cast(m_value2indices.size()); ++val) { - if (std::find(m_values.begin(), m_values.end(), val) == m_values.end() && m_value2indices[val] != 0) { - return false; // Unused indices should have a 0 value - } - } + // // All indices in m_value2indices that are not used in m_values should be 0 + // for (int val = 0; val < static_cast(m_value2indices.size()); ++val) { + // if (std::find(m_values.begin(), m_values.end(), val) == m_values.end() && m_value2indices[val] != 0) { + // return false; // Unused indices should have a 0 value + // } + // } if (idx < static_cast(m_values.size())) { SASSERT(m_value2indices[m_values[idx]] == idx);