From 8caa0653a81ffd432f44077b1895888f4385b4b1 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sun, 29 Dec 2024 21:27:50 +0100 Subject: [PATCH] warning: deleting 'void*' is undefined [-Wdelete-incomplete] warning Some DirectX sdk's declars D3DRMIMAGE::buffer1 and D3DRMIMAGE::buffer2 as a void pointer. --- LEGO1/tgl/d3drm/texture.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LEGO1/tgl/d3drm/texture.cpp b/LEGO1/tgl/d3drm/texture.cpp index 79452ba6..ea8ef1b0 100644 --- a/LEGO1/tgl/d3drm/texture.cpp +++ b/LEGO1/tgl/d3drm/texture.cpp @@ -81,7 +81,7 @@ TglD3DRMIMAGE::TglD3DRMIMAGE( void TglD3DRMIMAGE::Destroy() { if (m_texelsAllocatedByClient == 0) { - delete m_image.buffer1; + delete[] ((char*) m_image.buffer1); } delete m_image.palette; } @@ -111,7 +111,7 @@ Result TglD3DRMIMAGE::CreateBuffer(int width, int height, int depth, void* pBuff m_image.bytes_per_line = width; if (!m_texelsAllocatedByClient) { - delete[] m_image.buffer1; + delete[] ((char*) m_image.buffer1); m_image.buffer1 = NULL; }