diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-03-02 10:11:23 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-03-02 08:54:56 +0100 |
commit | 8ae8bea13565012410ecf13332f4696346294c12 (patch) | |
tree | ca0543d7ee2cc4baa13872a73f44729a86c86a63 /sal/rtl/string.cxx | |
parent | 2d33c22e55b7af7481cc36a1fff979a33daf8519 (diff) |
Drop useless indirection and unused template
Change-Id: Icbcf56c30c9d901a4436f56a1648a7c8e7504848
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130817
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal/rtl/string.cxx')
-rw-r--r-- | sal/rtl/string.cxx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx index 87c65f6069ce..c5d535075354 100644 --- a/sal/rtl/string.cxx +++ b/sal/rtl/string.cxx @@ -506,28 +506,33 @@ sal_Bool SAL_CALL rtl_str_toBoolean(const char* pStr) SAL_THROW_EXTERN_C() sal_Int32 SAL_CALL rtl_str_toInt32(const char* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C() { - return rtl::str::toInt32(pStr, nRadix); + assert(pStr); + return rtl::str::toInt<sal_Int32>(pStr, nRadix); } sal_Int64 SAL_CALL rtl_str_toInt64(const char* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C() { - return rtl::str::toInt64(pStr, nRadix); + assert(pStr); + return rtl::str::toInt<sal_Int64>(pStr, nRadix); } sal_Int64 SAL_CALL rtl_str_toInt64_WithLength(const char* pStr, sal_Int16 nRadix, sal_Int32 nStrLength) SAL_THROW_EXTERN_C() { - return rtl::str::toInt64_WithLength(pStr, nRadix, nStrLength); + assert(pStr || nStrLength == 0); + return rtl::str::toInt<sal_Int64>(std::basic_string_view(pStr, nStrLength), nRadix); } sal_uInt32 SAL_CALL rtl_str_toUInt32(const char* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C() { - return rtl::str::toUInt32(pStr, nRadix); + assert(pStr); + return rtl::str::toInt<sal_uInt32>(pStr, nRadix); } sal_uInt64 SAL_CALL rtl_str_toUInt64(const char* pStr, sal_Int16 nRadix) SAL_THROW_EXTERN_C() { - return rtl::str::toUInt64(pStr, nRadix); + assert(pStr); + return rtl::str::toInt<sal_uInt64>(pStr, nRadix); } rtl_String* rtl_string_ImplAlloc(sal_Int32 nLen) { return rtl::str::Alloc<rtl_String>(nLen); } |