summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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()