summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/strtmpl.cxx57
-rw-r--r--sal/util/sal.map6
2 files changed, 3 insertions, 60 deletions
diff --git a/sal/rtl/strtmpl.cxx b/sal/rtl/strtmpl.cxx
index a9eb665e9216..957609692449 100644
--- a/sal/rtl/strtmpl.cxx
+++ b/sal/rtl/strtmpl.cxx
@@ -252,68 +252,17 @@ sal_Int32 SAL_CALL IMPL_RTL_STRNAME( hashCode )( const IMPL_RTL_STRCODE* pStr )
/* ----------------------------------------------------------------------- */
-sal_uInt64 SAL_CALL IMPL_RTL_STRNAME( hashCode64_WithLength )( const IMPL_RTL_STRCODE* pStr,
- sal_Int32 nLen )
- SAL_THROW_EXTERN_C()
-{
- sal_uInt64 nHash = 0;
-
- for( sal_Int32 i = 0; i < nLen; i++ )
- nHash = (nHash << 5) - nHash + *pStr++;
- return nHash;
-}
-
-/* ----------------------------------------------------------------------- */
-
sal_Int32 SAL_CALL IMPL_RTL_STRNAME( hashCode_WithLength )( const IMPL_RTL_STRCODE* pStr,
sal_Int32 nLen )
SAL_THROW_EXTERN_C()
{
sal_uInt32 h = static_cast<sal_uInt32>(nLen);
-
- if ( nLen < 256 )
- {
- while ( nLen > 0 )
- {
- h = (h*37U) + IMPL_RTL_USTRCODE( *pStr );
- pStr++;
- nLen--;
- }
- }
- else
+ while ( nLen > 0 )
{
- sal_Int32 nSkip;
- const IMPL_RTL_STRCODE* pEndStr = pStr+nLen-5;
-
- /* only sample some characters */
- /* the first 3, some characters between, and the last 5 */
- h = (h*39U) + IMPL_RTL_USTRCODE( *pStr );
- pStr++;
- h = (h*39U) + IMPL_RTL_USTRCODE( *pStr );
- pStr++;
- h = (h*39U) + IMPL_RTL_USTRCODE( *pStr );
+ h = (h*37U) + IMPL_RTL_USTRCODE( *pStr );
pStr++;
-
- nSkip = nLen / 8;
- nLen -= 8;
- while ( nLen > 0 )
- {
- h = (h*39U) + IMPL_RTL_USTRCODE( *pStr );
- pStr += nSkip;
- nLen -= nSkip;
- }
-
- h = (h*39U) + IMPL_RTL_USTRCODE( *pEndStr );
- pEndStr++;
- h = (h*39U) + IMPL_RTL_USTRCODE( *pEndStr );
- pEndStr++;
- h = (h*39U) + IMPL_RTL_USTRCODE( *pEndStr );
- pEndStr++;
- h = (h*39U) + IMPL_RTL_USTRCODE( *pEndStr );
- pEndStr++;
- h = (h*39U) + IMPL_RTL_USTRCODE( *pEndStr );
+ nLen--;
}
-
return static_cast<sal_Int32>(h);
}
diff --git a/sal/util/sal.map b/sal/util/sal.map
index 074eb7b96063..1456d6db1cf8 100644
--- a/sal/util/sal.map
+++ b/sal/util/sal.map
@@ -670,12 +670,6 @@ LIBO_UDK_4.2 { # symbols available in >= LibO 4.2
rtl_ustr_toUInt32;
} LIBO_UDK_4.1;
-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;