From: tgdwyer Date: Wed, 22 Feb 2006 06:31:01 +0000 (+0000) Subject: Fixed template warning. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9765928d461305451eb6199a1a9417e09549dee9;p=inkscape.git Fixed template warning. --- diff --git a/src/removeoverlap/pairingheap/PairingHeap.h b/src/removeoverlap/pairingheap/PairingHeap.h index f8c3abf35..52941873b 100644 --- a/src/removeoverlap/pairingheap/PairingHeap.h +++ b/src/removeoverlap/pairingheap/PairingHeap.h @@ -38,23 +38,26 @@ // Node and forward declaration because g++ does // not understand nested classes. -template +template class PairingHeap; +template +std::ostream& operator<< (std::ostream &os,const PairingHeap &b); + template class PairNode { - template - friend std::ostream& operator <<(std::ostream &os,const PairingHeap &b); - + friend std::ostream& operator<< (std::ostream &os,const PairingHeap &b); T element; PairNode *leftChild; PairNode *nextSibling; PairNode *prev; - PairNode( const T & theElement ) : element( theElement ), - leftChild(NULL), nextSibling(NULL), prev(NULL) { } - friend class PairingHeap; + PairNode( const T & theElement ) : + element( theElement ), + leftChild(NULL), nextSibling(NULL), prev(NULL) + { } + friend class PairingHeap; }; template @@ -67,8 +70,7 @@ public: template class PairingHeap { - template - friend std::ostream& operator <<(std::ostream &os,const PairingHeap &b); + friend std::ostream& operator<< (std::ostream &os,const PairingHeap &b); public: PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) ); PairingHeap( const PairingHeap & rhs );