diff options
author | Muthu Subramanian <sumuthu@collabora.com> | 2014-02-18 12:49:05 +0530 |
---|---|---|
committer | Muthu Subramanian <sumuthu@collabora.com> | 2014-02-18 12:49:05 +0530 |
commit | fb2c25a7b82f38fb286c25cb33fcbc5247008d26 (patch) | |
tree | d62128cb7dac00d6f635a05a898ec3908ab7652c | |
parent | 9f8baf0ed263889e3e77ea12ccb908020fee05a8 (diff) |
String cleanups.
Change-Id: Ia4a9630822678a7b9ea6e5af87e58cfd0ebacff3
-rw-r--r-- | sal/inc/rtl/string.hxx | 2 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 15 | ||||
-rw-r--r-- | sal/util/sal.map | 7 |
3 files changed, 23 insertions, 1 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 4b7b072cb398..e9a9342ef4fa 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -872,6 +872,8 @@ public: @return a hash code value of the string data @see hashCode() for simple hashes + + @since LibreOffice 4.3 */ sal_uInt64 hashCode64() const SAL_THROW(()) { diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 36295116dbe9..1f75101f08d7 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -1168,6 +1168,21 @@ public: } /** + Returns a 64bit hash of the string data. + This hashes the entire data, while hashCode would do sampling for larger string sizes. + + @return a hash code value of the string data + + @see hashCode() for simple hashes + + @since LibreOffice 4.3 + */ + sal_uInt64 hashCode64() const SAL_THROW(()) + { + return rtl_ustr_hashCode64_WithLength( pData->buffer, pData->length ); + } + + /** Returns a hashcode for this string. @return a hash code value for this object. diff --git a/sal/util/sal.map b/sal/util/sal.map index 83d824c7f513..7ab421fd089b 100644 --- a/sal/util/sal.map +++ b/sal/util/sal.map @@ -221,7 +221,6 @@ UDK_3_0_0 { rtl_str_shortenedCompareIgnoreAsciiCase_WithLength; rtl_str_hashCode; rtl_str_hashCode_WithLength; - rtl_str_hashCode64_WithLength; rtl_str_indexOfChar; rtl_str_indexOfChar_WithLength; rtl_str_indexOfStr; @@ -653,6 +652,12 @@ LIBO_UDK_4.0 { # symbols available in >= LibO 4.0 rtl_uString_newReplaceAllFromIndex; } LIBO_UDK_3.6; +LIBO_UDK_4.3 { #symbols available in >= LibO 4.3 + global: + rtl_str_hashCode64_WithLength; + rtl_ustr_hashCode64_WithLength; +} LIBO_UDK_4.2; + PRIVATE_1.0 { global: osl_detail_ObjectRegistry_storeAddresses; |