summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgavl.cxx12
-rw-r--r--sot/source/sdstor/stgavl.hxx4
-rw-r--r--sot/source/sdstor/stgdir.cxx4
-rw-r--r--sot/source/sdstor/stgdir.hxx2
4 files changed, 11 insertions, 11 deletions
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index d488eec69130..0c78054045f0 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -40,7 +40,7 @@ StgAvlNode* StgAvlNode::Find( StgAvlNode const * pFind )
StgAvlNode* p = this;
while( p )
{
- short nRes = p->Compare( pFind );
+ sal_Int32 nRes = p->Compare( pFind );
if( !nRes )
return p;
else p = ( nRes < 0 ) ? p->m_pLeft : p->m_pRight;
@@ -52,11 +52,11 @@ StgAvlNode* StgAvlNode::Find( StgAvlNode const * pFind )
// find point to add node to AVL tree and returns
// +/0/- for >/=/< previous
-short StgAvlNode::Locate
+sal_Int32 StgAvlNode::Locate
( StgAvlNode const * pFind,
StgAvlNode** pPivot, StgAvlNode **pParent, StgAvlNode** pPrev )
{
- short nRes = 0;
+ sal_Int32 nRes = 0;
StgAvlNode* pCur = this;
OSL_ENSURE( pPivot && pParent && pPrev, "The pointers may not be NULL!" );
@@ -98,7 +98,7 @@ short StgAvlNode::Adjust( StgAvlNode** pHeavy, StgAvlNode const * pNew )
if( pCur == pNew || !pNew )
return m_nBalance;
- short nRes = Compare( pNew );
+ sal_Int32 nRes = Compare( pNew );
if( nRes > 0 )
{
*pHeavy = pCur = m_pRight;
@@ -221,7 +221,7 @@ StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, bool bPtrs )
if( p && *p && pDel )
{
StgAvlNode* pCur = *p;
- short nRes = bPtrs ? short( pCur == pDel ) : pCur->Compare( pDel );
+ sal_Int32 nRes = bPtrs ? sal_Int32( pCur == pDel ) : pCur->Compare( pDel );
if( !nRes )
{
// Element found: remove
@@ -295,7 +295,7 @@ bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
return true;
}
// find insertion point and return if already present
- short nRes = (*pRoot)->Locate( pIns, &pPivot, &pParent, &pPrev );
+ sal_Int32 nRes = (*pRoot)->Locate( pIns, &pPivot, &pParent, &pPrev );
if( !nRes )
return false;
diff --git a/sot/source/sdstor/stgavl.hxx b/sot/source/sdstor/stgavl.hxx
index d521eb00b290..5dd29a988f30 100644
--- a/sot/source/sdstor/stgavl.hxx
+++ b/sot/source/sdstor/stgavl.hxx
@@ -27,7 +27,7 @@ class StgAvlNode
{
friend class StgAvlIterator;
private:
- short Locate( StgAvlNode const *, StgAvlNode**, StgAvlNode**, StgAvlNode** );
+ sal_Int32 Locate( StgAvlNode const *, StgAvlNode**, StgAvlNode**, StgAvlNode** );
short Adjust( StgAvlNode**, StgAvlNode const * );
StgAvlNode* RotLL();
StgAvlNode* RotLR();
@@ -45,7 +45,7 @@ public:
StgAvlNode* Find( StgAvlNode const * );
static bool Insert( StgAvlNode**, StgAvlNode* );
static bool Remove( StgAvlNode**, StgAvlNode*, bool bDel );
- virtual short Compare( const StgAvlNode* ) const = 0;
+ virtual sal_Int32 Compare( const StgAvlNode* ) const = 0;
};
// The iterator class provides single stepping through an AVL tree.
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index b2e64967c436..6ca1d60b61f7 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -92,9 +92,9 @@ StgDirEntry::~StgDirEntry()
// Comparison function
-short StgDirEntry::Compare( const StgAvlNode* p ) const
+sal_Int32 StgDirEntry::Compare( const StgAvlNode* p ) const
{
- short nResult = -1;
+ sal_Int32 nResult = -1;
if ( p )
{
const StgDirEntry* pEntry = static_cast<const StgDirEntry*>(p);
diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx
index 95c624c1205b..b4f1035c0078 100644
--- a/sot/source/sdstor/stgdir.hxx
+++ b/sot/source/sdstor/stgdir.hxx
@@ -45,7 +45,7 @@ class StgDirEntry : public StgAvlNode
bool m_bDirty; // dirty directory entry
bool m_bRemoved; // removed per Invalidate()
void InitMembers(); // ctor helper
- virtual short Compare( const StgAvlNode* ) const override;
+ virtual sal_Int32 Compare( const StgAvlNode* ) const override;
bool StoreStream( StgIo& ); // store the stream
bool StoreStreams( StgIo& ); // store all streams
void RevertAll(); // revert the whole tree