From ba79489ea1c29fa00803067fd222bf910d8715ad Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Thu, 25 Apr 2019 02:32:31 -0400 Subject: [PATCH] Remove null check in allocate --- include/boost/core/default_allocator.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/boost/core/default_allocator.hpp b/include/boost/core/default_allocator.hpp index d13b93a..c269b85 100644 --- a/include/boost/core/default_allocator.hpp +++ b/include/boost/core/default_allocator.hpp @@ -78,9 +78,6 @@ struct default_allocator { if (n > max_size()) { boost::throw_exception(std::bad_alloc()); } - if (!n) { - return 0; - } void* p = ::operator new(sizeof(T) * n, std::nothrow); if (!p) { boost::throw_exception(std::bad_alloc());