From 3137494be8d6ab987804a1e4aa52545c8991f643 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Thu, 30 Nov 2023 10:57:26 -0500 Subject: [PATCH] Add scalar ddtor to verify inline destructor --- LEGO1/tgl/d3drm/impl.h | 8 +++++++- LEGO1/tgl/d3drm/mesh.cpp | 12 +++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/LEGO1/tgl/d3drm/impl.h b/LEGO1/tgl/d3drm/impl.h index 287f107e..627043b3 100644 --- a/LEGO1/tgl/d3drm/impl.h +++ b/LEGO1/tgl/d3drm/impl.h @@ -204,7 +204,13 @@ class LightImpl : public Light { class MeshImpl : public Mesh { public: MeshImpl() : m_data(0) {} - ~MeshImpl(); + ~MeshImpl() + { + if (m_data) { + delete m_data; + m_data = NULL; + } + } virtual void* ImplementationDataPtr(); diff --git a/LEGO1/tgl/d3drm/mesh.cpp b/LEGO1/tgl/d3drm/mesh.cpp index 883f4d8d..c6fd0e56 100644 --- a/LEGO1/tgl/d3drm/mesh.cpp +++ b/LEGO1/tgl/d3drm/mesh.cpp @@ -7,15 +7,6 @@ DECOMP_SIZE_ASSERT(D3DRMVERTEX, 0x24); DECOMP_SIZE_ASSERT(Mesh, 0x4); DECOMP_SIZE_ASSERT(MeshImpl, 0x8); -// Inlined only -MeshImpl::~MeshImpl() -{ - if (m_data) { - free(m_data); - m_data = NULL; - } -} - // OFFSET: LEGO1 0x100a3ed0 void* MeshImpl::ImplementationDataPtr() { @@ -39,6 +30,9 @@ Result MeshImpl::SetColor(float p_r, float p_g, float p_b, float p_a) } } +// OFFSET: LEGO1 0x100a3d80 TEMPLATE +// TglImpl::MeshImpl::`scalar deleting destructor' + // OFFSET: LEGO1 0x100a3f50 Result MeshImpl::SetTexture(const Texture* p_texture) {