summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-09-17 07:42:31 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2021-09-17 13:44:20 +0200
commit11c8109fa109ef8178679b4de6efde695b99e0a8 (patch)
treeb5f27972c7eea5db43be7c413b9eb8df3d7d17da /sal
parent8c49b17e482545e3c5c67d7b4bbf452eed366695 (diff)
Drop this unneeded indirection
Change-Id: I6b40642c7574a1863658854d206ed849517dbd0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122130 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/string.cxx4
-rw-r--r--sal/rtl/strtmpl.hxx8
-rw-r--r--sal/rtl/ustring.cxx4
3 files changed, 4 insertions, 12 deletions
diff --git a/sal/rtl/string.cxx b/sal/rtl/string.cxx
index 94be8029032a..b8a96d43a07b 100644
--- a/sal/rtl/string.cxx
+++ b/sal/rtl/string.cxx
@@ -23,7 +23,6 @@
#include <cstdlib>
#include <osl/interlck.h>
-#include <rtl/alloc.h>
#include <osl/diagnose.h>
#include <rtl/tencinfo.h>
@@ -599,7 +598,8 @@ void SAL_CALL rtl_string_new(rtl_String** ppThis) SAL_THROW_EXTERN_C()
rtl_String* SAL_CALL rtl_string_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
{
- return rtl::str::alloc<rtl_String>(nLen);
+ assert(nLen >= 0);
+ return rtl::str::Alloc<rtl_String>(nLen);
}
void SAL_CALL rtl_string_new_WithLength(rtl_String** ppThis, sal_Int32 nLen) SAL_THROW_EXTERN_C()
diff --git a/sal/rtl/strtmpl.hxx b/sal/rtl/strtmpl.hxx
index 493184f92efa..f26c21225177 100644
--- a/sal/rtl/strtmpl.hxx
+++ b/sal/rtl/strtmpl.hxx
@@ -1099,14 +1099,6 @@ template <typename IMPL_RTL_STRINGDATA> void new_( IMPL_RTL_STRINGDATA** ppThis
/* ----------------------------------------------------------------------- */
-template <typename IMPL_RTL_STRINGDATA> IMPL_RTL_STRINGDATA* alloc( sal_Int32 nLen )
-{
- assert(nLen >= 0);
- return Alloc<IMPL_RTL_STRINGDATA>( nLen );
-}
-
-/* ----------------------------------------------------------------------- */
-
template <typename IMPL_RTL_STRINGDATA>
void new_WithLength( IMPL_RTL_STRINGDATA** ppThis, sal_Int32 nLen )
{
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index 4aac64556666..ee84510bcc7f 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -27,7 +27,6 @@
#include <osl/diagnose.h>
#include <osl/interlck.h>
-#include <rtl/alloc.h>
#include <osl/mutex.h>
#include <rtl/tencinfo.h>
@@ -1793,7 +1792,8 @@ void SAL_CALL rtl_uString_new(rtl_uString** ppThis) SAL_THROW_EXTERN_C()
rtl_uString* SAL_CALL rtl_uString_alloc(sal_Int32 nLen) SAL_THROW_EXTERN_C()
{
- return rtl::str::alloc<rtl_uString>(nLen);
+ assert(nLen >= 0);
+ return rtl::str::Alloc<rtl_uString>(nLen);
}
void SAL_CALL rtl_uString_new_WithLength(rtl_uString** ppThis, sal_Int32 nLen) SAL_THROW_EXTERN_C()