Revision: 360 Author: nieklinnenbank Date: Sat Sep 5 15:24:41 2009 Log: Fixed compilation error on SortedList.h under FreeBSD 7.0 with GCC 3.4. In file included from bin/parse/Main.cpp:25: include/SortedList.h:28: error: conflicting declaration 'class U'include/SortedList.h:28: error: 'struct U' has a previous declaration as `struct U'
include/SortedList.h:59: error: conflicting declaration 'class T' http://code.google.com/p/freenos/source/detail?r=360 Modified: /trunk/include/SortedList.h ======================================= --- /trunk/include/SortedList.h Thu Aug 13 06:14:41 2009 +++ /trunk/include/SortedList.h Sat Sep 5 15:24:41 2009 @@ -25,7 +25,7 @@ * Represents an item in the SortedList. The data in a SortedListNode * cannot be (U*)0. */ -template <class U = class Comparable<class U> > class SortedListNode +template <class U> class SortedListNode { public: @@ -35,7 +35,7 @@ * @param p Previous SortedListNode. * @param n Next SortedListNode. */ - SortedListNode(U* t + SortedListNode(Comparable<U> *t , SortedListNode<U>* p , SortedListNode<U>* n) : data(t), prev(p), next(n) @@ -56,7 +56,7 @@ * Represents a sorted list. Every item in a SortedList must implement * the functions of the Comparable class as to sort the items in the list. */ -template <class T = class Comparable<class T> > class SortedList +template <class T> class SortedList { public: @@ -100,7 +100,7 @@ * @param t The data to insert to the list.* @see SortedList::insert(SortedListNode<T>* t, SortedListNode<T>* from)
*/ - void insert(T* t) + void insert(Comparable<T> *t) { assertRead(t); @@ -134,7 +134,7 @@ * @param t The data to remove from the list. * @see http://en.wikipedia.org/wiki/Big_O_notation */ - void remove(T* t) + void remove(Comparable <T> *t) { if(!t) {