libs/libxx: remove redundant code

Follow the change: https://github.com/apache/nuttx/pull/9151,
that is no need to deal with zero size in C++ allocator.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
This commit is contained in:
fangxinyong 2023-05-03 10:21:47 +08:00 committed by Xiang Xiao
parent 884be2bdb9
commit f1e37a4987
2 changed files with 0 additions and 14 deletions

View File

@ -48,13 +48,6 @@
FAR void *operator new(std::size_t nbytes)
{
// We have to allocate something
if (nbytes < 1)
{
nbytes = 1;
}
// Perform the allocation
FAR void *alloc = lib_malloc(nbytes);

View File

@ -56,13 +56,6 @@
FAR void *operator new[](std::size_t nbytes)
{
// We have to allocate something
if (nbytes < 1)
{
nbytes = 1;
}
// Perform the allocation
FAR void *alloc = lib_malloc(nbytes);