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:
Xiang Xiao 2022-11-04 18:43:20 +08:00 committed by Petro Karashchenko
parent 1f78f8a9c6
commit e1cc1199bb
2 changed files with 6 additions and 6 deletions

View File

@ -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;
};

View File

@ -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;
}
/**