summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sal/inc/rtl/ustring.hxx23
-rw-r--r--sal/rtl/source/strtmpl.cxx2
2 files changed, 1 insertions, 24 deletions
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index ad6fad22713e..a5528894e0d4 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -192,7 +192,6 @@ public:
@param literal the 8-bit ASCII string literal
- @exception std::bad_alloc is thrown if an out-of-memory condition occurs
@since LibreOffice 3.6
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
@@ -203,13 +202,6 @@ public:
{
pData = 0;
rtl_uString_newFromLiteral( &pData, literal, N - 1 );
- if (pData == 0) {
-#if defined EXCEPTIONS_OFF
- SAL_WARN("sal", "std::bad_alloc but EXCEPTIONS_OFF");
-#else
- throw std::bad_alloc();
-#endif
- }
#ifdef RTL_STRING_UNITTEST
rtl_string_unittest_const_literal = true;
#endif
@@ -237,13 +229,6 @@ public:
{
pData = 0;
rtl_uString_newFromLiteral( &pData, literal, internal::ConstCharArrayDetector< T, void >::size - 1 );
- if (pData == 0) {
-#if defined EXCEPTIONS_OFF
- SAL_WARN("sal", "std::bad_alloc but EXCEPTIONS_OFF");
-#else
- throw std::bad_alloc();
-#endif
- }
#ifdef RTL_STRING_UNITTEST
rtl_string_unittest_const_literal = true;
#endif
@@ -379,20 +364,12 @@ public:
@param literal the 8-bit ASCII string literal
- @exception std::bad_alloc is thrown if an out-of-memory condition occurs
@since LibreOffice 3.6
*/
template< typename T >
typename internal::ConstCharArrayDetector< T, OUString& >::Type operator=( T& literal )
{
rtl_uString_newFromLiteral( &pData, literal, internal::ConstCharArrayDetector< T, void >::size - 1 );
- if (pData == 0) {
-#if defined EXCEPTIONS_OFF
- SAL_WARN("sal", "std::bad_alloc but EXCEPTIONS_OFF");
-#else
- throw std::bad_alloc();
-#endif
- }
return *this;
}
diff --git a/sal/rtl/source/strtmpl.cxx b/sal/rtl/source/strtmpl.cxx
index 026d6473b6d1..8e1de8bdab0f 100644
--- a/sal/rtl/source/strtmpl.cxx
+++ b/sal/rtl/source/strtmpl.cxx
@@ -1218,7 +1218,7 @@ void SAL_CALL IMPL_RTL_STRINGNAME( newFromLiteral)( IMPL_RTL_STRINGDATA** ppThis
IMPL_RTL_STRINGNAME( release )( *ppThis );
*ppThis = IMPL_RTL_STRINGNAME( ImplAlloc )( nLen );
- OSL_ASSERT(*ppThis != NULL);
+ assert( *ppThis != NULL );
if ( (*ppThis) )
{
IMPL_RTL_STRCODE* pBuffer = (*ppThis)->buffer;