[Libreoffice-commits] core.git: sal/rtl
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 17 11:44:53 UTC 2021
sal/rtl/string.cxx | 4 ++--
sal/rtl/strtmpl.hxx | 8 --------
sal/rtl/ustring.cxx | 4 ++--
3 files changed, 4 insertions(+), 12 deletions(-)
New commits:
commit 11c8109fa109ef8178679b4de6efde695b99e0a8
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Fri Sep 17 07:42:31 2021 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Fri Sep 17 13:44:20 2021 +0200
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 at collabora.com>
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()
More information about the Libreoffice-commits
mailing list