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:
parent
884be2bdb9
commit
f1e37a4987
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue