summaryrefslogtreecommitdiff
path: root/lotuswordpro/source/filter/explode.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lotuswordpro/source/filter/explode.cxx')
-rw-r--r--lotuswordpro/source/filter/explode.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
index 7f60a9dfa737..497252d1d67a 100644
--- a/lotuswordpro/source/filter/explode.cxx
+++ b/lotuswordpro/source/filter/explode.cxx
@@ -459,16 +459,6 @@ HuffmanTreeNode::HuffmanTreeNode(sal_uInt32 nValue )
}
HuffmanTreeNode::~HuffmanTreeNode()
{
- if (left)
- {
- delete left;
- left = nullptr;
- }
- if (right)
- {
- delete right;
- right = nullptr;
- }
}
HuffmanTreeNode * HuffmanTreeNode::InsertNode(sal_uInt32 nValue, const sal_Char * pInCode)
@@ -485,9 +475,9 @@ HuffmanTreeNode * HuffmanTreeNode::InsertNode(sal_uInt32 nValue, const sal_Char
pParent = InsertNode(0xffffffff, aCode.c_str());
}
if (cLast == '0')
- pParent->left = pNew;
+ pParent->left.reset(pNew);
else // (cChar == '1')
- pParent->right = pNew;
+ pParent->right.reset(pNew);
return pNew;
}
@@ -502,11 +492,11 @@ HuffmanTreeNode * HuffmanTreeNode::QueryNode(const sal_Char * pCode)
sal_Char cChar= pCode[i];
if (cChar == '0')
{
- pNode = pNode->left;
+ pNode = pNode->left.get();
}
else // (cChar == '1')
{
- pNode = pNode->right;
+ pNode = pNode->right.get();
}
}
return pNode;