Anonymous avatar Anonymous committed 765350e

fix const/non-const pointers and refs

Comments (0)

Files changed (1)

Navigation/NavigableIterator.h

 {
  public:
 
-  typedef CHILDCOLL                          coll_type;
-  typedef typename coll_type::iterator       coll_iterator;
-  typedef typename coll_type::const_iterator coll_const_iterator;
-  typedef CHILD                              child_type;
-
   ////////////////////////////////
   // Constructor and Destructor //
   ////////////////////////////////
 
-  NavigableIterator(const coll_type* theCollection)
+  NavigableIterator(const CHILDCOLL* theCollection)
     : m_collection(theCollection)
     { }
 
   NavigableIterator  operator++(int) { this->next(); }
   NavigableIterator& operator--()    { this->previous(); }
   NavigableIterator  operator--(int) { this->previous(); }
-  bool operator==( NavigableIterator<child_type, coll_type>& 
+  bool operator==( NavigableIterator<CHILD,CHILDCOLL>& 
 		   anOtherIterator) const
     { return m_actual == anOtherIterator.m_actual; }
-  bool operator!=( NavigableIterator<child_type, coll_type>& 
+  bool operator!=( NavigableIterator<CHILD,CHILDCOLL>& 
 		   anOtherIterator) const
     { return !( *this == anOtherIterator ); }
 
   // operators for value retrieval
-  child_type operator*() const
+  const CHILD* operator*() const
     {
       return ( m_actual != m_collection->end() )
 	? m_collection->getChildPtr(m_actual)
 	: 0;
     }
-  child_type operator->() const
+  const CHILD* operator->() const
     {
       return m_actual != m_collection->end() 
 	? m_collection->getChildPtr(m_actual)
 
  protected:
 
-  coll_const_iterator m_actual;
-  const coll_type*    m_collection;
+  typename CHILDCOLL::const_iterator m_actual;
+  const CHILDCOLL*                   m_collection;
 
 };  
 #endif
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.