summaryrefslogtreecommitdiff
path: root/sal/cpprt
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-03 10:00:55 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-03 10:00:55 +0300
commit335cd830b0bd430d282687df58a91a69dac2c528 (patch)
tree3d49d43ed0c07d643b9fd081e6eb0522b57851c2 /sal/cpprt
parentc04f4393f5ec63dbd546b5c503ddc82d9cd2377e (diff)
Kill superfluous vertical whitespace
Change-Id: I8c37b9ec45836f9c0e2dc0cf232f96f23c7c36d3
Diffstat (limited to 'sal/cpprt')
-rw-r--r--sal/cpprt/operators_new_delete.cxx30
1 files changed, 0 insertions, 30 deletions
diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx
index b82eb8cbad14..081b95859913 100644
--- a/sal/cpprt/operators_new_delete.cxx
+++ b/sal/cpprt/operators_new_delete.cxx
@@ -23,10 +23,8 @@
#include <osl/diagnose.h>
#include <rtl/alloc.h>
-
// AllocatorTraits
-
namespace
{
@@ -70,8 +68,6 @@ struct AllocatorTraits
}
};
-
-
struct VectorTraits : public AllocatorTraits
{
static const signature_type g_signature;
@@ -95,18 +91,14 @@ const AllocatorTraits::signature_type ScalarTraits::g_signature = "new() ";
} // anonymous namespace
-
// Allocator
-
static void default_handler (void)
{
// Multithreading race in 'std::set_new_handler()' call sequence below.
throw std::bad_alloc();
}
-
-
static void* allocate (
std::size_t n, AllocatorTraits const & rTraits)
SAL_THROW((std::bad_alloc))
@@ -128,8 +120,6 @@ static void* allocate (
}
}
-
-
static void* allocate_nothrow (
std::size_t n, AllocatorTraits const & rTraits)
SAL_THROW(())
@@ -144,8 +134,6 @@ static void* allocate_nothrow (
}
}
-
-
static void deallocate (void * p, AllocatorTraits const & rTraits)
SAL_THROW(())
{
@@ -155,70 +143,52 @@ 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: */