diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-13 21:54:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-14 07:26:09 +0200 |
commit | 4464f851a34fb000673e54a3f7d6395682d53003 (patch) | |
tree | 4949c92e86069ae43e54437f9f49fc6b3f6b6d58 /sal/rtl | |
parent | a9d3d2b34415edd0d7018e940b41321b9951d151 (diff) |
These rtl_hash* functions appear to never have been exported from sal
They were introduced with 9399c662f36c385b0c705eb34e636a9aec450282 "initial
import" without any trace of being exported DLLPUBLIC-style, and were probably
included in error in the initial sal/util/sal.map when that was introduced in
92b0714c409bd3cffcefd338371ee000fa1b5805 "new".
That means the functions themselves can be moved from extern "C" to an unnamed
namespace (and the resulting loplugin:salbool warnings be fixed).
Change-Id: Ida99540edce9560e69081f507e41db2af34966fb
Reviewed-on: https://gerrit.libreoffice.org/60469
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/locale.cxx | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sal/rtl/locale.cxx b/sal/rtl/locale.cxx index 3fb85e1b8bb7..579538f056f3 100644 --- a/sal/rtl/locale.cxx +++ b/sal/rtl/locale.cxx @@ -47,7 +47,9 @@ static RTL_HASHTABLE* g_pLocaleTable = nullptr; static rtl_Locale* g_pDefaultLocale = nullptr; -extern "C" void rtl_hashentry_destroy(RTL_HASHENTRY* entry) +namespace { + +void rtl_hashentry_destroy(RTL_HASHENTRY* entry) { rtl_uString_release(entry->Entry->Language); rtl_uString_release(entry->Entry->Country); @@ -60,7 +62,7 @@ extern "C" void rtl_hashentry_destroy(RTL_HASHENTRY* entry) free(entry); } -extern "C" void rtl_hashtable_destroy(RTL_HASHTABLE* table) +void rtl_hashtable_destroy(RTL_HASHTABLE* table) { sal_Int32 size = 0; @@ -81,7 +83,7 @@ extern "C" void rtl_hashtable_destroy(RTL_HASHTABLE* table) free(table); } -extern "C" void rtl_hashtable_init(RTL_HASHTABLE** table, sal_Int8 sizeIndex) +void rtl_hashtable_init(RTL_HASHTABLE** table, sal_Int8 sizeIndex) { sal_Int32 nSize = RTL_HASHTABLE_SIZE[sizeIndex]; @@ -102,14 +104,14 @@ extern "C" void rtl_hashtable_init(RTL_HASHTABLE** table, sal_Int8 sizeIndex) } } -extern "C" sal_Int32 rtl_hashfunc(RTL_HASHTABLE* table, sal_Int32 key) +sal_Int32 rtl_hashfunc(RTL_HASHTABLE* table, sal_Int32 key) { return (static_cast<sal_uInt32>(key) % table->Size); } -extern "C" sal_Bool rtl_hashtable_grow(RTL_HASHTABLE** table); +bool rtl_hashtable_grow(RTL_HASHTABLE** table); -extern "C" rtl_Locale* rtl_hashtable_add(RTL_HASHTABLE** table, rtl_Locale* value) +rtl_Locale* rtl_hashtable_add(RTL_HASHTABLE** table, rtl_Locale* value) { sal_Int32 key = 0; @@ -138,7 +140,7 @@ extern "C" rtl_Locale* rtl_hashtable_add(RTL_HASHTABLE** table, rtl_Locale* valu return nullptr; } -sal_Bool rtl_hashtable_grow(RTL_HASHTABLE** table) +bool rtl_hashtable_grow(RTL_HASHTABLE** table) { RTL_HASHTABLE* pNewTable = nullptr; sal_Int32 i = 0; @@ -175,7 +177,7 @@ sal_Bool rtl_hashtable_grow(RTL_HASHTABLE** table) return true; } -extern "C" sal_Bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal_Int32 hashCode, rtl_Locale** pValue) +bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal_Int32 hashCode, rtl_Locale** pValue) { if (!table) return false; @@ -202,6 +204,8 @@ extern "C" sal_Bool rtl_hashtable_find(RTL_HASHTABLE * table, sal_Int32 key, sal return true; } +} + void rtl_locale_init() { OSL_ASSERT(!g_pLocaleTable); |