diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-09 21:10:04 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-09 22:04:31 +0000 |
commit | d22519f62bcd1325f1e7cc920a115b68fccd1922 (patch) | |
tree | 3b761a7f8c25f8f765c8d25662a803e47b5a7167 /sot | |
parent | d44168795aed842d524e3a349962f2b98a8ac504 (diff) |
V801: Decreased performance
Change-Id: Id8cd45d2844c121f63684734ab3546c24a1aab32
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgcache.cxx | 12 | ||||
-rw-r--r-- | sot/source/sdstor/stgcache.hxx | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx index 7b96e4f456ea..1d09b7beadac 100644 --- a/sot/source/sdstor/stgcache.cxx +++ b/sot/source/sdstor/stgcache.cxx @@ -57,15 +57,15 @@ rtl::Reference< StgPage > StgPage::Create( short nData, sal_Int32 nPage ) return rtl::Reference< StgPage >( new StgPage( nData, nPage ) ); } -void StgCache::SetToPage ( const rtl::Reference< StgPage > xPage, short nOff, sal_Int32 nVal ) +void StgCache::SetToPage ( const rtl::Reference< StgPage >& rPage, short nOff, sal_Int32 nVal ) { - if( ( nOff < (short) ( xPage->GetSize() / sizeof( sal_Int32 ) ) ) && nOff >= 0 ) + if( ( nOff < (short) ( rPage->GetSize() / sizeof( sal_Int32 ) ) ) && nOff >= 0 ) { #ifdef OSL_BIGENDIAN nVal = OSL_SWAPDWORD(nVal); #endif - ((sal_Int32*) xPage->GetData() )[ nOff ] = nVal; - SetDirty( xPage ); + ((sal_Int32*) rPage->GetData() )[ nOff ] = nVal; + SetDirty( rPage ); } } @@ -272,10 +272,10 @@ void StgCache::SetStrm( UCBStorageStream* pStgStream ) bMyStream = false; } -void StgCache::SetDirty( const rtl::Reference< StgPage > &xPage ) +void StgCache::SetDirty( const rtl::Reference< StgPage > &rPage ) { assert( IsWritable() ); - maDirtyPages[ xPage->GetPage() ] = xPage; + maDirtyPages[ rPage->GetPage() ] = rPage; } // Open/close the disk file diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx index bee74e30f708..b531f5130ae2 100644 --- a/sot/source/sdstor/stgcache.hxx +++ b/sot/source/sdstor/stgcache.hxx @@ -86,9 +86,9 @@ public: // two routines for accessing FAT pages // Assume that the data is a FAT page and get/put FAT data. - void SetToPage ( const rtl::Reference< StgPage > xPage, short nOff, sal_Int32 nVal ); - inline sal_Int32 GetFromPage ( const rtl::Reference< StgPage > xPage, short nOff ); - void SetDirty ( const rtl::Reference< StgPage > &xPage ); + void SetToPage ( const rtl::Reference< StgPage >& rPage, short nOff, sal_Int32 nVal ); + inline sal_Int32 GetFromPage ( const rtl::Reference< StgPage >& rPage, short nOff ); + void SetDirty ( const rtl::Reference< StgPage > &rPage ); bool SetSize( sal_Int32 nPages ); rtl::Reference< StgPage > Find( sal_Int32 ); // find a cached page rtl::Reference< StgPage > Get( sal_Int32, bool ); // get a cached page @@ -115,11 +115,11 @@ public: static bool IsPageGreater( const StgPage *pA, const StgPage *pB ); }; -inline sal_Int32 StgCache::GetFromPage ( const rtl::Reference< StgPage > xPage, short nOff ) +inline sal_Int32 StgCache::GetFromPage ( const rtl::Reference< StgPage >& rPage, short nOff ) { - if( ( nOff >= (short) ( xPage->GetSize() / sizeof( sal_Int32 ) ) ) || nOff < 0 ) + if( ( nOff >= (short) ( rPage->GetSize() / sizeof( sal_Int32 ) ) ) || nOff < 0 ) return -1; - sal_Int32 n = ((sal_Int32*) xPage->GetData() )[ nOff ]; + sal_Int32 n = ((sal_Int32*) rPage->GetData() )[ nOff ]; #ifdef OSL_BIGENDIAN return OSL_SWAPDWORD(n); #else |