diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2014-02-13 13:13:53 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2014-02-13 13:13:53 +0530 |
commit | 8f8bc0dcf3bc253ae49159d52db049767f476ced (patch) | |
tree | 080da7007b55eac85432d41337f6ea2cda629334 /sd | |
parent | 67b1dad8815f697e92258b8c079720f3a7028ea9 (diff) |
Move string hash function into String class.
hashCode() seems to do sampling while creating the hash.
hashCode64() will not.
Change-Id: Id30f5a2a774cf5244dbc00da9649e95a532484be
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/core/sdpage2.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index 0f7f7cf558b5..a870895dd32c 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -54,16 +54,6 @@ using namespace ::com::sun::star::office; extern void NotifyDocumentEvent( SdDrawDocument* pDocument, const OUString& rEventName, const Reference< XInterface >& xSource ); -static sal_uInt64 lcl_getHash( OString aString ) -{ - sal_Int32 len = aString.getLength(); - sal_uInt64 nHash = 0; - - for( sal_Int32 i = 0; i < len; i++ ) - nHash = (nHash << 5) - nHash + aString[i]; - return nHash; -} - /************************************************************************* |* |* Sets: names of layout, master page links and templates for presentation @@ -615,7 +605,7 @@ OString SdPage::stringify() const sal_uInt64 SdPage::getHash() const { - return lcl_getHash( stringify() ); + return stringify().hashCode64(); } |