std C/C++ patch

David Scott Page page at cs.utexas.edu
Wed Apr 24 08:10:15 EDT 2002


Hi,

I have modified the Click user-level source in order to compile it
with Kai C++ (an EDG frontend compiler that almost implements the C++
standard). It turned out that the majority of changes were removing
the use of gcc language extensions that have nothing to do with
performance and little to do with readability (trailing comma in
initializer list, default argument in postfix increment operator,
redundant default argument in method definition, uncommented text
after #endif).

I am breaking up the diff into a series of patches so you can better
evaluate what/how you want to apply to click.  The first patch
consists of the simple syntax cleanup described above, and was created
against the CVS version of click of about 0600 CDT, 24 April
2002. I'll submit the remainder in the next day or so. The only
testing I've done is to ensure the modified source compiles with gcc
on Solaris 8 sparc (user--level only) and run test.click, test2.click,
test3.click, and fakeiprouter.click.

Please let me know if you have any questions or comments.

Scott Page

------------------- click-stdC++.0.1.patch ------------------------
diff -Naur click-stdC++.0/elements/ethernet/ethermirror.hh click-stdC++.1/elements/ethernet/ethermirror.hh
--- click-stdC++.0/elements/ethernet/ethermirror.hh	Thu Nov  2 00:35:23 2000
+++ click-stdC++.1/elements/ethernet/ethermirror.hh	Wed Apr 24 11:07:57 2002
@@ -25,4 +25,4 @@
   
 };
 
-#endif ETHERMIRROR_HH
+#endif // ETHERMIRROR_HH
diff -Naur click-stdC++.0/elements/ip/ipfilter.hh click-stdC++.1/elements/ip/ipfilter.hh
--- click-stdC++.0/elements/ip/ipfilter.hh	Fri Feb  8 00:03:09 2002
+++ click-stdC++.1/elements/ip/ipfilter.hh	Wed Apr 24 11:07:57 2002
@@ -156,7 +156,7 @@
     OP_EQ = 0, OP_GT = 1, OP_LT = 2,
     
     // if you change this, change click-fastclassifier.cc also
-    TRANSP_FAKE_OFFSET = 64,
+    TRANSP_FAKE_OFFSET = 64
   };
 
   struct Primitive {
diff -Naur click-stdC++.0/elements/ip/ipmirror.hh click-stdC++.1/elements/ip/ipmirror.hh
--- click-stdC++.0/elements/ip/ipmirror.hh	Thu May  3 21:44:34 2001
+++ click-stdC++.1/elements/ip/ipmirror.hh	Wed Apr 24 11:07:57 2002
@@ -39,4 +39,4 @@
   
 };
 
-#endif IPMIRROR_HH
+#endif // IPMIRROR_HH
diff -Naur click-stdC++.0/elements/ip/ipratemon.cc click-stdC++.1/elements/ip/ipratemon.cc
--- click-stdC++.0/elements/ip/ipratemon.cc	Tue Apr 16 19:09:03 2002
+++ click-stdC++.1/elements/ip/ipratemon.cc	Wed Apr 24 11:07:57 2002
@@ -302,7 +302,7 @@
 // Prints out nice data.
 //
 String
-IPRateMonitor::print(Stats *s, String ip = "")
+IPRateMonitor::print(Stats *s, String ip)
 {
   String ret = "";
   for (int i = 0; i < MAX_COUNTERS; i++) {
diff -Naur click-stdC++.0/elements/ip/iprw.hh click-stdC++.1/elements/ip/iprw.hh
--- click-stdC++.0/elements/ip/iprw.hh	Mon Mar  4 08:04:21 2002
+++ click-stdC++.1/elements/ip/iprw.hh	Wed Apr 24 11:07:57 2002
@@ -41,7 +41,7 @@
 	CONFIGURE_PHASE_PATTERNS = CONFIGURE_PHASE_INFO,
 	CONFIGURE_PHASE_REWRITER = CONFIGURE_PHASE_DEFAULT,
 	CONFIGURE_PHASE_MAPPER = CONFIGURE_PHASE_REWRITER - 1,
-	CONFIGURE_PHASE_USER = CONFIGURE_PHASE_REWRITER + 1,
+	CONFIGURE_PHASE_USER = CONFIGURE_PHASE_REWRITER + 1
     };
 
     int configure_phase() const 	{ return CONFIGURE_PHASE_REWRITER; }
diff -Naur click-stdC++.0/elements/standard/classifier.cc click-stdC++.1/elements/standard/classifier.cc
--- click-stdC++.0/elements/standard/classifier.cc	Tue Mar 26 22:03:05 2002
+++ click-stdC++.1/elements/standard/classifier.cc	Wed Apr 24 11:07:57 2002
@@ -641,7 +641,7 @@
 
 void
 Classifier::finish_expr_subtree(Vector<int> &tree, bool is_and,
-				int success = SUCCESS, int failure = FAILURE)
+				int success, int failure)
 {
   int level = tree[0];
   Vector<int> subtrees;
diff -Naur click-stdC++.0/elements/standard/pokehandlers.cc click-stdC++.1/elements/standard/pokehandlers.cc
--- click-stdC++.0/elements/standard/pokehandlers.cc	Fri Apr  5 21:01:12 2002
+++ click-stdC++.1/elements/standard/pokehandlers.cc	Wed Apr 24 11:07:57 2002
@@ -24,6 +24,8 @@
 #include <click/router.hh>
 
 static const char * const READ_MARKER = "r";
+Element * const PokeHandlers::STOP_MARKER = (Element *)1;
+Element * const PokeHandlers::LOOP_MARKER = (Element *)2;
 
 PokeHandlers::PokeHandlers()
     : _timer(timer_hook, this)
diff -Naur click-stdC++.0/elements/standard/pokehandlers.hh click-stdC++.1/elements/standard/pokehandlers.hh
--- click-stdC++.0/elements/standard/pokehandlers.hh	Fri Feb  8 00:03:29 2002
+++ click-stdC++.1/elements/standard/pokehandlers.hh	Wed Apr 24 11:07:57 2002
@@ -74,8 +74,8 @@
 
   private:
 
-    static Element * const STOP_MARKER = (Element *)1;
-    static Element * const LOOP_MARKER = (Element *)2;
+    static Element * const STOP_MARKER ;
+    static Element * const LOOP_MARKER ;
 
     int _pos;
     Vector<Element *> _h_element;
diff -Naur click-stdC++.0/elements/userlevel/controlsocket.hh click-stdC++.1/elements/userlevel/controlsocket.hh
--- click-stdC++.0/elements/userlevel/controlsocket.hh	Fri Apr  5 21:01:15 2002
+++ click-stdC++.1/elements/userlevel/controlsocket.hh	Wed Apr 24 11:07:57 2002
@@ -181,7 +181,7 @@
     CSERR_DATA_TOO_BIG		= 521,
     CSERR_PERMISSION		= HandlerProxy::CSERR_PERMISSION,      // 530
     CSERR_NO_ROUTER		= HandlerProxy::CSERR_NO_ROUTER,       // 540
-    CSERR_UNSPECIFIED		= HandlerProxy::CSERR_UNSPECIFIED,     // 590
+    CSERR_UNSPECIFIED		= HandlerProxy::CSERR_UNSPECIFIED      // 590
   };
   
  private:
diff -Naur click-stdC++.0/elements/userlevel/handlerproxy.hh click-stdC++.1/elements/userlevel/handlerproxy.hh
--- click-stdC++.0/elements/userlevel/handlerproxy.hh	Tue Mar 26 23:51:34 2002
+++ click-stdC++.1/elements/userlevel/handlerproxy.hh	Wed Apr 24 11:07:57 2002
@@ -22,7 +22,7 @@
     CSERR_HANDLER_ERROR		= 520,
     CSERR_PERMISSION		= 530,
     CSERR_NO_ROUTER		= 540,
-    CSERR_UNSPECIFIED		= 590,
+    CSERR_UNSPECIFIED		= 590
   };
   
  protected:
diff -Naur click-stdC++.0/include/click/bighashmap.cc click-stdC++.1/include/click/bighashmap.cc
--- click-stdC++.0/include/click/bighashmap.cc	Tue Jul  3 21:15:34 2001
+++ click-stdC++.1/include/click/bighashmap.cc	Wed Apr 24 11:07:57 2002
@@ -320,7 +320,7 @@
 
 template <class K, class V>
 void
-BigHashMapIterator<K, V>::operator++(int = 0)
+BigHashMapIterator<K, V>::operator++(int)
 {
   if (_elt->next)
     _elt = _elt->next;
@@ -671,7 +671,7 @@
 
 template <class K>
 void
-BigHashMapIterator<K, void *>::operator++(int = 0)
+BigHashMapIterator<K, void *>::operator++(int)
 {
   if (_elt->next)
     _elt = _elt->next;
diff -Naur click-stdC++.0/include/click/bighashmap.hh click-stdC++.1/include/click/bighashmap.hh
--- click-stdC++.0/include/click/bighashmap.hh	Sun Dec  2 19:37:15 2001
+++ click-stdC++.1/include/click/bighashmap.hh	Wed Apr 24 11:07:57 2002
@@ -89,7 +89,7 @@
   BigHashMapIterator(const BigHashMap<K, V> *);
 
   operator bool() const			{ return _elt; }
-  void operator++(int = 0);
+  void operator++(int);
   
   const K &key() const			{ return _elt->k; }
   const V &value() const		{ return _elt->v; }
@@ -97,7 +97,7 @@
  private:
 
   const BigHashMap<K, V> *_hm;
-  BigHashMap<K, V>::Elt *_elt;
+  typename BigHashMap<K, V>::Elt *_elt;
   int _bucket;
 
 };
@@ -200,7 +200,7 @@
   BigHashMapIterator(const BigHashMap<K, void *> *);
 
   operator bool() const			{ return _elt; }
-  void operator++(int = 0);
+  void operator++(int);
   
   const K &key() const			{ return _elt->k; }
   void *value() const			{ return _elt->v; }
@@ -208,7 +208,7 @@
  private:
 
   const BigHashMap<K, void *> *_hm;
-  BigHashMap<K, void *>::Elt *_elt;
+  typename BigHashMap<K, void *>::Elt *_elt;
   int _bucket;
 
 };
diff -Naur click-stdC++.0/include/click/confparse.hh click-stdC++.1/include/click/confparse.hh
--- click-stdC++.0/include/click/confparse.hh	Tue Mar  5 16:41:58 2002
+++ click-stdC++.1/include/click/confparse.hh	Wed Apr 24 11:07:57 2002
@@ -37,7 +37,7 @@
   CPE_FORMAT,
   CPE_NEGATIVE,
   CPE_OVERFLOW,
-  CPE_INVALID,
+  CPE_INVALID
 };
 extern int cp_errno;
 
diff -Naur click-stdC++.0/include/click/hashmap.cc click-stdC++.1/include/click/hashmap.cc
--- click-stdC++.0/include/click/hashmap.cc	Wed Mar  6 00:30:31 2002
+++ click-stdC++.1/include/click/hashmap.cc	Wed Apr 24 11:12:21 2002
@@ -185,7 +185,7 @@
 
 template <class K, class V>
 void
-HashMapIterator<K, V>::operator++(int = 0)
+HashMapIterator<K, V>::operator++(int)
 {
   HashMap<K, V>::Elt *e = _hm->_e;
   int capacity = _hm->_capacity;
diff -Naur click-stdC++.0/include/click/hashmap.hh click-stdC++.1/include/click/hashmap.hh
--- click-stdC++.0/include/click/hashmap.hh	Sun Dec  2 19:37:16 2001
+++ click-stdC++.1/include/click/hashmap.hh	Wed Apr 24 11:13:05 2002
@@ -70,7 +70,7 @@
   HashMapIterator(const HashMap<K, V> *);
 
   operator bool() const			{ return _pos < _hm->_capacity; }
-  void operator++(int = 0);
+  void operator++(int);
   
   const K &key() const			{ return _hm->_e[_pos].k; }
   V &value()				{ return _hm->_e[_pos].v; }
diff -Naur click-stdC++.0/include/click/lexer.hh click-stdC++.1/include/click/lexer.hh
--- click-stdC++.0/include/click/lexer.hh	Sun Dec  2 19:37:16 2001
+++ click-stdC++.1/include/click/lexer.hh	Wed Apr 24 11:07:57 2002
@@ -17,7 +17,7 @@
   lex3Dot,
   lexTunnel,
   lexElementclass,
-  lexRequire,
+  lexRequire
 };
 
 class Lexeme { public:
diff -Naur click-stdC++.0/lib/archive.cc click-stdC++.1/lib/archive.cc
--- click-stdC++.0/lib/archive.cc	Sun Dec  2 19:37:17 2001
+++ click-stdC++.1/lib/archive.cc	Wed Apr 24 11:07:57 2002
@@ -64,7 +64,7 @@
 
 int
 separate_ar_string(const String &s, Vector<ArchiveElement> &v,
-		   ErrorHandler *errh = 0)
+		   ErrorHandler *errh)
 {
   if (!errh)
     errh = ErrorHandler::silent_handler();
@@ -160,7 +160,7 @@
 }
 
 String
-create_ar_string(const Vector<ArchiveElement> &v, ErrorHandler *errh = 0)
+create_ar_string(const Vector<ArchiveElement> &v, ErrorHandler *errh)
 {
   if (!errh)
     errh = ErrorHandler::silent_handler();
diff -Naur click-stdC++.0/lib/confparse.cc click-stdC++.1/lib/confparse.cc
--- click-stdC++.0/lib/confparse.cc	Thu Mar  7 18:32:53 2002
+++ click-stdC++.1/lib/confparse.cc	Wed Apr 24 11:07:57 2002
@@ -34,7 +34,7 @@
 # include <click/router.hh>
 # include <click/handlercall.hh>
 # include <click/standard/addressinfo.hh>
-# define CP_CONTEXT_ARG , Element *context = 0
+# define CP_CONTEXT_ARG , Element *context
 # define CP_PASS_CONTEXT , context
 #else
 # define CP_CONTEXT_ARG
@@ -353,7 +353,7 @@
 }
 
 String
-cp_quote(const String &str, bool allow_newlines = false)
+cp_quote(const String &str, bool allow_newlines)
 {
   if (!str)
     return String("\"\"");
@@ -557,7 +557,7 @@
 // PARSING STRINGS
 
 bool
-cp_string(const String &str, String *return_value, String *rest = 0)
+cp_string(const String &str, String *return_value, String *rest)
 {
   const char *s = str.data();
   int len = str.length();
@@ -602,7 +602,7 @@
 }
 
 bool
-cp_word(const String &str, String *return_value, String *rest = 0)
+cp_word(const String &str, String *return_value, String *rest)
 {
   String word;
   if (!cp_string(str, &word, rest))
diff -Naur click-stdC++.0/lib/handlercall.cc click-stdC++.1/lib/handlercall.cc
--- click-stdC++.0/lib/handlercall.cc	Sun Dec  2 19:37:19 2001
+++ click-stdC++.1/lib/handlercall.cc	Wed Apr 24 11:07:57 2002
@@ -74,7 +74,7 @@
 }
 
 String
-HandlerCall::call_read(Router *router, Element *e, const String &hname, ErrorHandler *errh = 0)
+HandlerCall::call_read(Router *router, Element *e, const String &hname, ErrorHandler *errh)
 {
     const Router::Handler *h = 0;
     int hi = router->find_handler(e, hname);
@@ -91,7 +91,7 @@
 }
 
 String
-HandlerCall::call_read(Router *router, const String &ename, const String &hname, ErrorHandler *errh = 0)
+HandlerCall::call_read(Router *router, const String &ename, const String &hname, ErrorHandler *errh)
 {
     Element *e = 0;
     if (ename) {
@@ -102,7 +102,7 @@
 }
 
 int
-HandlerCall::call_write(Router *router, Element *e, const String &hname, const String &value, ErrorHandler *errh = 0)
+HandlerCall::call_write(Router *router, Element *e, const String &hname, const String &value, ErrorHandler *errh)
 {
     if (!errh)
 	errh = ErrorHandler::silent_handler();
@@ -121,7 +121,7 @@
 }
 
 int
-HandlerCall::call_write(Router *router, const String &ename, const String &hname, const String &value, ErrorHandler *errh = 0)
+HandlerCall::call_write(Router *router, const String &ename, const String &hname, const String &value, ErrorHandler *errh)
 {
     Element *e = 0;
     if (ename) {
diff -Naur click-stdC++.0/lib/lexer.cc click-stdC++.1/lib/lexer.cc
--- click-stdC++.0/lib/lexer.cc	Wed Apr 17 00:51:38 2002
+++ click-stdC++.1/lib/lexer.cc	Wed Apr 24 11:07:57 2002
@@ -718,7 +718,7 @@
 }
 
 bool
-Lexer::expect(int kind, bool report_error = true)
+Lexer::expect(int kind, bool report_error)
 {
   // Never adds anything to '_tcircle'. This requires a nonobvious
   // implementation.
diff -Naur click-stdC++.0/lib/router.cc click-stdC++.1/lib/router.cc
--- click-stdC++.0/lib/router.cc	Tue Apr 23 00:51:21 2002
+++ click-stdC++.1/lib/router.cc	Wed Apr 24 11:15:02 2002
@@ -875,7 +875,7 @@
 }
 
 int
-Router::initialize(ErrorHandler *errh, bool verbose_errors = true)
+Router::initialize(ErrorHandler *errh, bool verbose_errors)
 {
   assert(!_initialized);
   if (!_preinitialized)
diff -Naur click-stdC++.0/lib/userutils.cc click-stdC++.1/lib/userutils.cc
--- click-stdC++.0/lib/userutils.cc	Tue Apr 23 00:50:06 2002
+++ click-stdC++.1/lib/userutils.cc	Wed Apr 24 11:07:57 2002
@@ -423,7 +423,7 @@
 
 String
 clickpath_find_file(const String &filename, const char *subdir,
-		    String default_path, ErrorHandler *errh = 0)
+		    String default_path, ErrorHandler *errh)
 {
   const char *path = clickpath();
   String was_default_path = default_path;
@@ -471,7 +471,7 @@
 }
 
 String
-click_mktmpdir(ErrorHandler *errh = 0)
+click_mktmpdir(ErrorHandler *errh)
 {
   String tmpdir;
   if (const char *path = getenv("TMPDIR"))
diff -Naur click-stdC++.0/tools/click-devirtualize/cxxclass.cc click-stdC++.1/tools/click-devirtualize/cxxclass.cc
--- click-stdC++.0/tools/click-devirtualize/cxxclass.cc	Fri May 25 00:04:24 2001
+++ click-stdC++.1/tools/click-devirtualize/cxxclass.cc	Wed Apr 24 11:07:57 2002
@@ -739,7 +739,7 @@
 
 void
 CxxInfo::parse_file(const String &original_text, bool header,
-		    String *store_includes = 0)
+		    String *store_includes)
 {
   String clean_text = remove_crap(original_text);
   CxxFunction::parsing_header_file = header;
diff -Naur click-stdC++.0/tools/click-pretty/html.cc click-stdC++.1/tools/click-pretty/html.cc
--- click-stdC++.0/tools/click-pretty/html.cc	Fri Jan  4 19:53:34 2002
+++ click-stdC++.1/tools/click-pretty/html.cc	Wed Apr 24 11:07:57 2002
@@ -23,7 +23,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <ctype.h>
-#include <click/straccum.hh>
 
 static String::Initializer string_initializer;
 static HashMap<String, String> html_entities;
@@ -130,7 +129,7 @@
 
 const char *
 process_tag(const char *x, String &tag, HashMap<String, String> &attrs,
-	    bool &ended, bool unquote_value = true)
+	    bool &ended, bool unquote_value)
 {
     // process tag
     while (isspace(*x))
@@ -207,7 +206,7 @@
 const char *
 output_template_until_tag(const char *templ, StringAccum &sa,
 			  String &tag, HashMap<String, String> &attrs,
-			  bool unquote = true, String *sep = 0)
+			  bool unquote, String *sep)
 {
     // skip to next directive
     tag = String();
@@ -238,7 +237,7 @@
 const char *
 output_template_until_tag(const char *templ, FILE *outf,
 			  String &tag, HashMap<String, String> &attrs,
-			  bool unquote = true, String *sep = 0)
+			  bool unquote, String *sep)
 {
     StringAccum sa;
     templ = output_template_until_tag(templ, sa, tag, attrs, unquote, sep);
diff -Naur click-stdC++.0/tools/click-pretty/html.hh click-stdC++.1/tools/click-pretty/html.hh
--- click-stdC++.0/tools/click-pretty/html.hh	Fri Jan  4 19:53:34 2002
+++ click-stdC++.1/tools/click-pretty/html.hh	Wed Apr 24 11:07:57 2002
@@ -2,6 +2,7 @@
 #ifndef CLICK_PRETTY_HTML_HH
 #define CLICK_PRETTY_HTML_HH
 #include <click/string.hh>
+#include <click/straccum.hh>
 #include <click/hashmap.hh>
 #include <stdio.h>
 
diff -Naur click-stdC++.0/tools/lib/elementmap.cc click-stdC++.1/tools/lib/elementmap.cc
--- click-stdC++.0/tools/lib/elementmap.cc	Fri Jan  4 23:14:00 2002
+++ click-stdC++.1/tools/lib/elementmap.cc	Wed Apr 24 11:07:57 2002
@@ -311,7 +311,7 @@
 }
 
 bool
-ElementMap::driver_compatible(const RouterT *r, int driver, ErrorHandler *errh = 0) const
+ElementMap::driver_compatible(const RouterT *r, int driver, ErrorHandler *errh) const
 {
     Vector<int> indexes;
     collect_indexes(r, indexes, errh);
@@ -355,7 +355,7 @@
 }
 
 bool
-ElementMap::parse_requirement_files(RouterT *r, const String &default_path, ErrorHandler *errh, String *not_found_store = 0)
+ElementMap::parse_requirement_files(RouterT *r, const String &default_path, ErrorHandler *errh, String *not_found_store)
 {
     String not_found;
 
diff -Naur click-stdC++.0/tools/lib/lexert.hh click-stdC++.1/tools/lib/lexert.hh
--- click-stdC++.0/tools/lib/lexert.hh	Fri Feb  8 23:09:32 2002
+++ click-stdC++.1/tools/lib/lexert.hh	Wed Apr 24 11:07:57 2002
@@ -20,7 +20,7 @@
     lex3Dot,
     lexTunnel,
     lexElementclass,
-    lexRequire,
+    lexRequire
 };
 
 class Lexeme { public:
diff -Naur click-stdC++.0/tools/lib/routert.cc click-stdC++.1/tools/lib/routert.cc
--- click-stdC++.0/tools/lib/routert.cc	Wed Jan  2 21:22:17 2002
+++ click-stdC++.1/tools/lib/routert.cc	Wed Apr 24 11:07:57 2002
@@ -28,7 +28,7 @@
 #include <click/variableenv.hh>
 #include <stdio.h>
 
-RouterT::RouterT(ElementClassT *type = 0, RouterT *enclosing_scope = 0)
+RouterT::RouterT(ElementClassT *type, RouterT *enclosing_scope)
     : _use_count(0), _enclosing_type(type),
       _enclosing_scope(enclosing_scope), _scope_cookie(0),
       _etype_map(-1), _element_name_map(-1),
@@ -162,7 +162,7 @@
 }
 
 ElementClassT *
-RouterT::get_type(ElementClassT *ec, bool install_name = false)
+RouterT::get_type(ElementClassT *ec, bool install_name)
 {
     if (install_name && try_type(ec->name()) != ec) {
 	int i = _etype_map[ec->name()];
@@ -727,7 +727,7 @@
 
 
 void
-RouterT::remove_dead_elements(ErrorHandler *errh = 0)
+RouterT::remove_dead_elements(ErrorHandler *errh)
 {
     if (!errh)
 	errh = ErrorHandler::silent_handler();
diff -Naur click-stdC++.0/tools/lib/routert.hh click-stdC++.1/tools/lib/routert.hh
--- click-stdC++.0/tools/lib/routert.hh	Wed Jan  2 21:22:18 2002
+++ click-stdC++.1/tools/lib/routert.hh	Wed Apr 24 11:07:57 2002
@@ -186,7 +186,7 @@
     iterator(RouterT *r)		{ step(r, 0); }
     operator bool() const		{ return _e; }
     int idx() const			{ return _e->idx(); }
-    void operator++(int = 0)		{ if (_e) step(_e->router(), idx()+1);}
+    void operator++(int)		{ if (_e) step(_e->router(), idx()+1);}
     operator ElementT *() const		{ return _e; }
     ElementT *operator->() const	{ return _e; }
   private:
@@ -198,7 +198,7 @@
     const_iterator(const RouterT *r)	{ step(r, 0); }
     operator bool() const		{ return _e; }
     int idx() const			{ return _e->idx(); }
-    void operator++(int = 0)		{ if (_e) step(_e->router(), idx()+1);}
+    void operator++(int)		{ if (_e) step(_e->router(), idx()+1);}
     operator const ElementT *() const	{ return _e; }
     const ElementT *operator->() const	{ return _e; }
   private:
@@ -210,7 +210,7 @@
     type_iterator(RouterT *, ElementClassT *);
     operator bool() const		{ return _e; }
     int idx() const			{ return _e->idx(); }
-    void operator++(int = 0)		{ if (_e) step(_e->router(), idx()+1);}
+    void operator++(int)		{ if (_e) step(_e->router(), idx()+1);}
     operator ElementT *() const		{ return _e; }
     ElementT *operator->() const	{ return _e; }
   private:



More information about the click mailing list