diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-27 13:07:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-08 09:20:31 +0200 |
commit | 751c771adc45cb150fa42bc70397e2571b28a60b (patch) | |
tree | be54e28005ac5c4d00a0c01dca2119f80d7f8119 /rsc/inc/rsctree.hxx | |
parent | f36f17f691903a389a7d98e85af12e08b75f6876 (diff) |
loplugin:mergeclass, merge BiNode with NameNode, Obj0Type with ObjkType
Change-Id: Icbc0dfc6096a6e2c651dad4fe9f78d176f389390
Diffstat (limited to 'rsc/inc/rsctree.hxx')
-rw-r--r-- | rsc/inc/rsctree.hxx | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/rsc/inc/rsctree.hxx b/rsc/inc/rsctree.hxx index 12ee456171ac..f2f6ac29d6ee 100644 --- a/rsc/inc/rsctree.hxx +++ b/rsc/inc/rsctree.hxx @@ -22,40 +22,30 @@ #include <tools/link.hxx> #include <rsctools.hxx> -class BiNode +class NameNode { + void SubOrderTree( NameNode * pOrderNode ); + protected: - BiNode* pLeft; // left subtree - BiNode* pRight; // right subtree + NameNode* pLeft; // left subtree + NameNode* pRight; // right subtree -public: + // pCmp ist Zeiger auf Namen + NameNode* Search( const void * pCmp ) const; // convert a double linked list into a binary tree - BiNode * ChangeDLListBTree( BiNode * pList ); - - BiNode(); - virtual ~BiNode(); + NameNode* ChangeDLListBTree( NameNode * pList ); + NameNode(); + virtual ~NameNode(); // convert a binary tree in a double linked list - BiNode* ChangeBTreeDLList(); - - BiNode * Left() const { return pLeft ; } - BiNode * Right() const{ return pRight ; } - void EnumNodes( Link<> aLink ) const; -}; - -class NameNode : public BiNode -{ - void SubOrderTree( NameNode * pOrderNode ); - -protected: - // pCmp is a pointer to name - NameNode* Search( const void * pCmp ) const; + NameNode* ChangeBTreeDLList(); public: - NameNode* Left() const { return static_cast<NameNode *>(pLeft); } - NameNode* Right() const{ return static_cast<NameNode *>(pRight); } + void EnumNodes( Link<> aLink ) const; + NameNode* Left() const { return pLeft; } + NameNode* Right() const{ return pRight; } NameNode* Search( const NameNode * pName ) const; // insert a new node in the b-tree bool Insert( NameNode * pTN, sal_uInt32 * nDepth ); |