[gtkmm] Gtk::TreeIter<>: Fix operator==() and operator!=()
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gtk::TreeIter<>: Fix operator==() and operator!=()
- Date: Wed, 15 Mar 2017 08:15:19 +0000 (UTC)
commit f1b0ec4da726c7ee8042349795d7b374add33a2f
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Tue Mar 14 16:45:15 2017 +0100
Gtk::TreeIter<>: Fix operator==() and operator!=()
It shall be possible to compare a TreeModel::iterator with a TreeModel::
const_iterator, i.e. a TreeIter<TreeRow> with a TreeIter<TreeConstRow>.
Let the comparison operators take const TreeIterBase3&.
TreeIterBase3 is a base class of TreeIter<>. Bug 134520
gtk/src/treeiter.hg | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/src/treeiter.hg b/gtk/src/treeiter.hg
index bd38b79..23e385e 100644
--- a/gtk/src/treeiter.hg
+++ b/gtk/src/treeiter.hg
@@ -254,13 +254,11 @@ public:
}; // class TreeIter<>
/** @relates Gtk::TreeIter */
-template <typename T>
-inline bool operator==(const TreeIter<T>& lhs, const TreeIter<T>& rhs)
+inline bool operator==(const TreeIterBase3& lhs, const TreeIterBase3& rhs)
{ return lhs.equal(rhs); }
/** @relates Gtk::TreeIter */
-template <typename T>
-inline bool operator!=(const TreeIter<T>& lhs, const TreeIter<T>& rhs)
+inline bool operator!=(const TreeIterBase3& lhs, const TreeIterBase3& rhs)
{ return !lhs.equal(rhs); }
template <typename RowType, typename ColumnType>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]