diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-08 15:18:16 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2013-10-08 15:48:12 -0400 |
commit | 3786609a153b7fa38393eb646557d241af2d3060 (patch) | |
tree | d2d33086cf318229a7893dc0958630834fc1ec16 /svl/source/misc/sharedstringpool.cxx | |
parent | a7ff6e0a3fc5fccad33f06ae9d4ec7019f9ae156 (diff) |
No more getIdentifier*() calls because they are not efficient.
They shall never be used.
Change-Id: I019c88b1511a67175d782777cd41e0ec0434f497
Diffstat (limited to 'svl/source/misc/sharedstringpool.cxx')
-rw-r--r-- | svl/source/misc/sharedstringpool.cxx | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/svl/source/misc/sharedstringpool.cxx b/svl/source/misc/sharedstringpool.cxx index 6b8f15287aca..46bf814f8468 100644 --- a/svl/source/misc/sharedstringpool.cxx +++ b/svl/source/misc/sharedstringpool.cxx @@ -52,28 +52,6 @@ SharedString SharedStringPool::intern( const OUString& rStr ) return SharedString(pOrig, aRes.first->pData); } -sal_uIntPtr SharedStringPool::getIdentifier( const OUString& rStr ) const -{ - StrHashType::const_iterator it = maStrPool.find(rStr); - return (it == maStrPool.end()) ? 0 : reinterpret_cast<sal_uIntPtr>(it->pData); -} - -sal_uIntPtr SharedStringPool::getIdentifierIgnoreCase( const OUString& rStr ) const -{ - StrHashType::const_iterator itOrig = maStrPool.find(rStr); - if (itOrig == maStrPool.end()) - // Not in the pool. - return 0; - - StrStoreType::const_iterator itUpper = maStrStore.find(itOrig->pData); - if (itUpper == maStrStore.end()) - // Passed string is not in the pool. - return 0; - - const rtl_uString* pUpper = itUpper->second.pData; - return reinterpret_cast<sal_uIntPtr>(pUpper); -} - namespace { inline sal_Int32 getRefCount( const rtl_uString* p ) |