diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:21:55 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-11-10 10:31:35 +0100 |
commit | 26f05d59bc1c25b8a0d19be7f4738fd12e557001 (patch) | |
tree | 560cccfaacf4b63385aa52ac4b3912248e87cbef /sal/cpprt | |
parent | 5bbdb9423e15b68438bb8397c15635e044129e28 (diff) |
loplugin:nullptr (automatic rewrite)
Change-Id: I1bc6c87fcd6e5e96362623be94c59be216a3b2b8
Diffstat (limited to 'sal/cpprt')
-rw-r--r-- | sal/cpprt/operators_new_delete.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sal/cpprt/operators_new_delete.cxx b/sal/cpprt/operators_new_delete.cxx index 5fbd9c09be7d..13491bd3889f 100644 --- a/sal/cpprt/operators_new_delete.cxx +++ b/sal/cpprt/operators_new_delete.cxx @@ -109,14 +109,14 @@ static void* allocate ( for (;;) { void * p = rtl_allocateMemory (sal_Size(n)); - if (p != 0) + if (p != nullptr) return rTraits.init (p); std::new_handler d = default_handler, f = std::set_new_handler (d); if (f != d) std::set_new_handler (f); - if (f == 0) + if (f == nullptr) throw std::bad_alloc(); (*f)(); } @@ -131,7 +131,7 @@ static void* allocate_nothrow ( } catch (std::bad_alloc const &) { - return 0; + return nullptr; } } |