Skip to content

Commit

Permalink
fixup! silence clang error. use modern iterator traits
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherlam committed Aug 17, 2023
1 parent 354d817 commit 537f8db
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gnucash/gnome-utils/gnc-tree-container.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,15 @@ class GncTreeData

// Custom iterator class
template <typename ModelType>
class GncTreeIter : public std::iterator<std::forward_iterator_tag, ModelType>
class GncTreeIter
{
public:
using iterator_category = std::forward_iterator_tag;
using value_type = ModelType;
using difference_type = ModelType;
using pointer = ModelType*;
using reference = ModelType&;

GncTreeIter(GtkTreeModel* model, std::optional<GtkTreeIter> iter) : m_model(model), m_iter(iter) {}

GncTreeIter(GtkTreeModel* model) : m_model (model)
Expand Down

0 comments on commit 537f8db

Please sign in to comment.