forked from boostorg/core
Remove null check in allocate
This commit is contained in:
@ -78,9 +78,6 @@ struct default_allocator {
|
|||||||
if (n > max_size()) {
|
if (n > max_size()) {
|
||||||
boost::throw_exception(std::bad_alloc());
|
boost::throw_exception(std::bad_alloc());
|
||||||
}
|
}
|
||||||
if (!n) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
void* p = ::operator new(sizeof(T) * n, std::nothrow);
|
void* p = ::operator new(sizeof(T) * n, std::nothrow);
|
||||||
if (!p) {
|
if (!p) {
|
||||||
boost::throw_exception(std::bad_alloc());
|
boost::throw_exception(std::bad_alloc());
|
||||||
|
Reference in New Issue
Block a user