mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
Fix error: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'?
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
1f78f8a9c6
commit
e1cc1199bb
2 changed files with 6 additions and 6 deletions
|
|
@ -579,7 +579,7 @@ void CGraphicsPort::drawBitmapGreyScale(nxgl_coord_t x, nxgl_coord_t y,
|
|||
src += bitmap->stride;
|
||||
}
|
||||
|
||||
delete run;
|
||||
delete[] run;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -824,7 +824,7 @@ void CGraphicsPort::_drawText(struct nxgl_point_s *pos, CRect *bound,
|
|||
pos->x += fontWidth;
|
||||
}
|
||||
|
||||
delete glyph;
|
||||
delete[] glyph;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -962,7 +962,7 @@ void CGraphicsPort::greyScale(nxgl_coord_t x, nxgl_coord_t y,
|
|||
&origin, rowBitmap.stride) ;
|
||||
}
|
||||
|
||||
delete rowBuffer;
|
||||
delete[] rowBuffer;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1038,5 +1038,5 @@ void CGraphicsPort::invert(nxgl_coord_t x, nxgl_coord_t y,
|
|||
&origin, rowBitmap.stride) ;
|
||||
}
|
||||
|
||||
delete rowBuffer;
|
||||
delete[] rowBuffer;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
|
|||
if (!m_bitmap->getRun(0, srcRow, nLeftPixels, &buffer[m_origin.x]))
|
||||
{
|
||||
ginfo("IBitmap::getRun failed at image row %d\n", srcRow);
|
||||
delete buffer;
|
||||
delete[] buffer;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -325,7 +325,7 @@ void CImage::drawContents(CGraphicsPort *port, bool selected)
|
|||
}
|
||||
}
|
||||
|
||||
delete buffer;
|
||||
delete[] buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue