diff options
author | Alexander Wilms <f.alexander.wilms@gmail.com> | 2014-02-25 19:51:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-01 05:35:12 -0600 |
commit | 4133c3e6ff31b63d6ea3e426f4e8715bf7895a86 (patch) | |
tree | 8723b297da9a03403ac1c08f7082bdd3fd4c6fe8 /sal/cpprt | |
parent | f586542c3d3e5fda3a73c736ceaee3719859942d (diff) |
Remove visual noise from sal
Change-Id: Idf07c7d31c0a523f929aded9ff3183a3f01b16b9
Reviewed-on: https://gerrit.libreoffice.org/8297
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sal/cpprt')
-rw-r--r-- | sal/cpprt/operators_new_delete.cxx | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx index 71abf0071932..b82eb8cbad14 100644 --- a/sal/cpprt/operators_new_delete.cxx +++ b/sal/cpprt/operators_new_delete.cxx @@ -23,9 +23,9 @@ #include <osl/diagnose.h> #include <rtl/alloc.h> -// ======================================================================= + // AllocatorTraits -// ======================================================================= + namespace { @@ -70,7 +70,7 @@ struct AllocatorTraits } }; -// ======================================================================= + struct VectorTraits : public AllocatorTraits { @@ -95,9 +95,9 @@ const AllocatorTraits::signature_type ScalarTraits::g_signature = "new() "; } // anonymous namespace -// ======================================================================= + // Allocator -// ======================================================================= + static void default_handler (void) { @@ -105,7 +105,7 @@ static void default_handler (void) throw std::bad_alloc(); } -// ======================================================================= + static void* allocate ( std::size_t n, AllocatorTraits const & rTraits) @@ -128,7 +128,7 @@ static void* allocate ( } } -// ======================================================================= + static void* allocate_nothrow ( std::size_t n, AllocatorTraits const & rTraits) @@ -144,7 +144,7 @@ static void* allocate_nothrow ( } } -// ======================================================================= + static void deallocate (void * p, AllocatorTraits const & rTraits) SAL_THROW(()) @@ -155,70 +155,70 @@ static void deallocate (void * p, AllocatorTraits const & rTraits) } } -// ======================================================================= + // T * p = new T; delete p; -// ======================================================================= + void* SAL_CALL operator new (std::size_t n) throw (std::bad_alloc) { return allocate (n, ScalarTraits()); } -// ======================================================================= + void SAL_CALL operator delete (void * p) throw () { deallocate (p, ScalarTraits()); } -// ======================================================================= + // T * p = new(nothrow) T; delete(nothrow) p; -// ======================================================================= + void* SAL_CALL operator new (std::size_t n, std::nothrow_t const &) throw () { return allocate_nothrow (n, ScalarTraits()); } -// ======================================================================= + void SAL_CALL operator delete (void * p, std::nothrow_t const &) throw () { deallocate (p, ScalarTraits()); } -// ======================================================================= + // T * p = new T[n]; delete[] p; -// ======================================================================= + void* SAL_CALL operator new[] (std::size_t n) throw (std::bad_alloc) { return allocate (n, VectorTraits()); } -// ======================================================================= + void SAL_CALL operator delete[] (void * p) throw () { deallocate (p, VectorTraits()); } -// ======================================================================= + // T * p = new(nothrow) T[n]; delete(nothrow)[] p; -// ======================================================================= + void* SAL_CALL operator new[] (std::size_t n, std::nothrow_t const &) throw () { return allocate_nothrow (n, VectorTraits()); } -// ======================================================================= + void SAL_CALL operator delete[] (void * p, std::nothrow_t const &) throw () { deallocate (p, VectorTraits()); } -// ======================================================================= + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |