[gnc-tree-container.hpp] bugfix in operator==

when comparing two GncTreeIter, if they both were end() iterators from
differing GtkTreeModels they would have been deemed equal. Amend so
that operator== returns false.
This commit is contained in:
Christopher Lam 2023-08-19 19:06:36 +08:00
parent 38435a75de
commit 63eae802a1

View File

@ -102,6 +102,8 @@ public:
bool operator==(const GncTreeIter& other) const
{
if (m_model != other.m_model)
return false;
if (!m_iter.has_value() && !other.m_iter.has_value())
return true;
if (!m_iter.has_value() || !other.m_iter.has_value())