diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-08-14 11:45:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-08-14 13:29:39 +0200 |
commit | c38592527adfc526133c3ac36b10aa77234313ee (patch) | |
tree | 0000e8f83527d769899e7b84d104eb93e47b82fd /include/rtl | |
parent | 86435f9e28f8e7936777cbd6e8598994e7c42428 (diff) |
EXCEPTIONS_OFF is never defined
...since gb_LinkTarget_NOEXCEPTIONFLAGS became unused with
e81b1f23c49e35c1cde1faa44281812e97be60f5 "remove
gb_LinkTarget_add_noexception_object."
Change-Id: I4a7275b5b26a9d4b6ded66efb52e6866e6e09cc3
Diffstat (limited to 'include/rtl')
-rw-r--r-- | include/rtl/byteseq.hxx | 13 | ||||
-rw-r--r-- | include/rtl/string.hxx | 9 | ||||
-rw-r--r-- | include/rtl/ustring.hxx | 23 |
3 files changed, 2 insertions, 43 deletions
diff --git a/include/rtl/byteseq.hxx b/include/rtl/byteseq.hxx index 800447395178..aaff08ed97a6 100644 --- a/include/rtl/byteseq.hxx +++ b/include/rtl/byteseq.hxx @@ -23,10 +23,7 @@ #include <rtl/byteseq.h> #include <rtl/alloc.h> -#if ! defined EXCEPTIONS_OFF #include <new> -#endif - namespace rtl { @@ -54,20 +51,16 @@ inline ByteSequence::ByteSequence( const sal_Int8 * pElements, sal_Int32 len ) : _pSequence( 0 ) { ::rtl_byte_sequence_constructFromArray( &_pSequence, pElements, len ); -#if ! defined EXCEPTIONS_OFF if (_pSequence == 0) throw ::std::bad_alloc(); -#endif } //__________________________________________________________________________________________________ inline ByteSequence::ByteSequence( sal_Int32 len, enum __ByteSequence_NoDefault ) : _pSequence( 0 ) { ::rtl_byte_sequence_constructNoDefault( &_pSequence, len ); -#if ! defined EXCEPTIONS_OFF if (_pSequence == 0) throw ::std::bad_alloc(); -#endif } //__________________________________________________________________________________________________ inline ByteSequence::ByteSequence( sal_Sequence *pSequence, enum __ByteSequence_NoAcquire ) SAL_THROW(()) @@ -79,10 +72,8 @@ inline ByteSequence::ByteSequence( sal_Int32 len ) : _pSequence( 0 ) { ::rtl_byte_sequence_construct( &_pSequence, len ); -#if ! defined EXCEPTIONS_OFF if (_pSequence == 0) throw ::std::bad_alloc(); -#endif } //__________________________________________________________________________________________________ inline ByteSequence::~ByteSequence() SAL_THROW(()) @@ -104,20 +95,16 @@ inline sal_Bool ByteSequence::operator == ( const ByteSequence & rSeq ) const SA inline sal_Int8 * ByteSequence::getArray() { ::rtl_byte_sequence_reference2One( &_pSequence ); -#if ! defined EXCEPTIONS_OFF if (_pSequence == 0) throw ::std::bad_alloc(); -#endif return (sal_Int8 *)_pSequence->elements; } //__________________________________________________________________________________________________ inline void ByteSequence::realloc( sal_Int32 nSize ) { ::rtl_byte_sequence_realloc( &_pSequence, nSize ); -#if ! defined EXCEPTIONS_OFF if (_pSequence == 0) throw ::std::bad_alloc(); -#endif } //__________________________________________________________________________________________________ inline sal_Int8 & ByteSequence::operator [] ( sal_Int32 nIndex ) diff --git a/include/rtl/string.hxx b/include/rtl/string.hxx index c1cbba9b768c..d58dc9f38e85 100644 --- a/include/rtl/string.hxx +++ b/include/rtl/string.hxx @@ -23,6 +23,7 @@ #include "sal/config.h" #include <cassert> +#include <new> #include <ostream> #include <string.h> @@ -37,10 +38,6 @@ #include "sal/log.hxx" -#if !defined EXCEPTIONS_OFF -#include <new> -#endif - // The unittest uses slightly different code to help check that the proper // calls are made. The class is put into a different namespace to make // sure the compiler generates a different (if generating also non-inline) @@ -231,11 +228,7 @@ public: pData = 0; rtl_uString2String( &pData, value, length, encoding, convertFlags ); if (pData == 0) { -#if defined EXCEPTIONS_OFF - abort(); -#else throw std::bad_alloc(); -#endif } } diff --git a/include/rtl/ustring.hxx b/include/rtl/ustring.hxx index fedd35ff6c6c..94527db4c828 100644 --- a/include/rtl/ustring.hxx +++ b/include/rtl/ustring.hxx @@ -23,6 +23,7 @@ #include "sal/config.h" #include <cassert> +#include <new> #include <ostream> #include <string.h> @@ -37,12 +38,6 @@ #include <rtl/stringconcat.hxx> #endif -#if defined EXCEPTIONS_OFF -#include <stdlib.h> -#else -#include <new> -#endif - // The unittest uses slightly different code to help check that the proper // calls are made. The class is put into a different namespace to make // sure the compiler generates a different (if generating also non-inline) @@ -244,11 +239,7 @@ public: pData = 0; rtl_string2UString( &pData, value, length, encoding, convertFlags ); if (pData == 0) { -#if defined EXCEPTIONS_OFF - abort(); -#else throw std::bad_alloc(); -#endif } } @@ -274,11 +265,7 @@ public: { rtl_uString_newFromCodePoints(&pData, codePoints, codePointCount); if (pData == NULL) { -#if defined EXCEPTIONS_OFF - abort(); -#else throw std::bad_alloc(); -#endif } } @@ -1894,11 +1881,7 @@ public: rtl_uString * pNew = 0; rtl_uString_intern( &pNew, pData ); if (pNew == 0) { -#if defined EXCEPTIONS_OFF - abort(); -#else throw std::bad_alloc(); -#endif } return OUString( pNew, SAL_NO_ACQUIRE ); } @@ -1937,11 +1920,7 @@ public: rtl_uString_internConvert( &pNew, value, length, encoding, convertFlags, pInfo ); if (pNew == 0) { -#if defined EXCEPTIONS_OFF - abort(); -#else throw std::bad_alloc(); -#endif } return OUString( pNew, SAL_NO_ACQUIRE ); } |