mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-22 10:54:01 +00:00
Fix some 'delete' warnings
This commit is contained in:
parent
ac30691553
commit
adcea1bddc
3 changed files with 4 additions and 4 deletions
|
@ -506,7 +506,7 @@ double Image<PixelType>::ComputeEntropy() {
|
|||
template<typename PixelType>
|
||||
void Image<PixelType>::SetImageData(uint32 width, uint32 height, PixelType *data) {
|
||||
if(m_Pixels) {
|
||||
delete m_Pixels;
|
||||
delete [] m_Pixels;
|
||||
}
|
||||
|
||||
if(!data) {
|
||||
|
|
|
@ -48,7 +48,7 @@ class ImageWriter {
|
|||
public:
|
||||
virtual ~ImageWriter() {
|
||||
if(m_RawFileData) {
|
||||
delete m_RawFileData;
|
||||
delete [] m_RawFileData;
|
||||
m_RawFileData = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ Image &Image::operator=(const Image &other) {
|
|||
FasTC::Image<FasTC::Pixel>::operator=(other);
|
||||
|
||||
assert(m_FractionalPixels);
|
||||
delete m_FractionalPixels;
|
||||
delete [] m_FractionalPixels;
|
||||
m_FractionalPixels = new FasTC::Pixel[other.GetWidth() * other.GetHeight()];
|
||||
memcpy(m_FractionalPixels, other.m_FractionalPixels,
|
||||
GetWidth() * GetHeight() * sizeof(FasTC::Pixel));
|
||||
|
@ -105,7 +105,7 @@ void Image::BilinearUpscale(uint32 xtimes, uint32 ytimes,
|
|||
FasTC::Pixel *upscaledPixels = new FasTC::Pixel[newWidth * newHeight];
|
||||
|
||||
assert(m_FractionalPixels);
|
||||
delete m_FractionalPixels;
|
||||
delete [] m_FractionalPixels;
|
||||
m_FractionalPixels = new FasTC::Pixel[newWidth * newHeight];
|
||||
|
||||
Indexer idxr(newWidth, newHeight, wrapMode);
|
||||
|
|
Loading…
Reference in a new issue