Skip to content

Commit

Permalink
Remove ptr_type typedef from wxList iterator classes
Browse files Browse the repository at this point in the history
This typedef is completely redundant with pointer_type which had been
also available in these classes since the very beginning and seems to
have been meant to be private originally, so it should be safe to just
remove it, especially because I couldn't find any existing code using
it.

If we do find such code in the wild later, this commit could be reverted
as it's not really indispensable.
  • Loading branch information
vadz committed Feb 23, 2018
1 parent fdbe357 commit 9edf067
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions include/wx/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -780,14 +780,13 @@ friend class wxHashTableBase; // should be able to call untyped Find()
\
typedef nodetype Node; \
typedef iterator itor; \
typedef value_type* ptr_type; \
\
Node* m_node; \
Node* m_init; \
public: \
/* Compatibility typedefs, don't use */ \
typedef reference reference_type; \
typedef ptr_type pointer_type; \
typedef pointer pointer_type; \
\
iterator(Node* node, Node* init) : m_node(node), m_init(init) {}\
iterator() : m_node(NULL), m_init(NULL) { } \
Expand Down Expand Up @@ -834,13 +833,12 @@ friend class wxHashTableBase; // should be able to call untyped Find()
typedef nodetype Node; \
typedef const value_type& const_reference; \
typedef const_iterator itor; \
typedef value_type* ptr_type; \
\
Node* m_node; \
Node* m_init; \
public: \
typedef const_reference reference_type; \
typedef const ptr_type pointer_type; \
typedef reference reference_type; \
typedef pointer pointer_type; \
\
const_iterator(Node* node, Node* init) \
: m_node(node), m_init(init) { } \
Expand Down Expand Up @@ -889,13 +887,12 @@ friend class wxHashTableBase; // should be able to call untyped Find()
\
typedef nodetype Node; \
typedef reverse_iterator itor; \
typedef value_type* ptr_type; \
\
Node* m_node; \
Node* m_init; \
public: \
typedef reference reference_type; \
typedef ptr_type pointer_type; \
typedef pointer pointer_type; \
\
reverse_iterator(Node* node, Node* init) \
: m_node(node), m_init(init) { } \
Expand Down Expand Up @@ -930,14 +927,13 @@ friend class wxHashTableBase; // should be able to call untyped Find()
\
typedef nodetype Node; \
typedef const_reverse_iterator itor; \
typedef value_type* ptr_type; \
typedef const value_type& const_reference; \
\
Node* m_node; \
Node* m_init; \
public: \
typedef const_reference reference_type; \
typedef const ptr_type pointer_type; \
typedef reference reference_type; \
typedef pointer pointer_type; \
\
const_reverse_iterator(Node* node, Node* init) \
: m_node(node), m_init(init) { } \
Expand Down

0 comments on commit 9edf067

Please sign in to comment.