summaryrefslogtreecommitdiff
path: root/sal/rtl/ustring.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-03-02 10:11:23 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-03-02 08:54:56 +0100
commit8ae8bea13565012410ecf13332f4696346294c12 (patch)
treeca0543d7ee2cc4baa13872a73f44729a86c86a63 /sal/rtl/ustring.cxx
parent2d33c22e55b7af7481cc36a1fff979a33daf8519 (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/ustring.cxx')
-rw-r--r--sal/rtl/ustring.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index 62157a6bafca..4451866e4588 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -1171,30 +1171,35 @@ sal_Bool SAL_CALL rtl_ustr_toBoolean(const sal_Unicode* pStr) SAL_THROW_EXTERN_C
sal_Int32 SAL_CALL rtl_ustr_toInt32(const sal_Unicode* 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_ustr_toInt64(const sal_Unicode* 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_ustr_toInt64_WithLength(const sal_Unicode* 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_ustr_toUInt32(const sal_Unicode* 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_ustr_toUInt64(const sal_Unicode* 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_uString* rtl_uString_ImplAlloc(sal_Int32 nLen)