From fad91c7ebf86325e7a32f81be3553d255ccde1be Mon Sep 17 00:00:00 2001 From: gabest11 Date: Sun, 5 Jul 2009 00:18:33 +0000 Subject: [PATCH] GSdx: got rid of that bogus multiple inheritance, it just didn't feel right git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1468 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GPUDrawScanline.h | 3 +-- plugins/GSdx/GSAlignedClass.h | 3 +-- plugins/GSdx/GSDrawScanline.h | 3 +-- plugins/GSdx/GSRasterizer.h | 3 ++- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/plugins/GSdx/GPUDrawScanline.h b/plugins/GSdx/GPUDrawScanline.h index 9d6f01fda3..524855ae2b 100644 --- a/plugins/GSdx/GPUDrawScanline.h +++ b/plugins/GSdx/GPUDrawScanline.h @@ -26,9 +26,8 @@ #include "GPUScanlineEnvironment.h" #include "GPUSetupPrimCodeGenerator.h" #include "GPUDrawScanlineCodeGenerator.h" -#include "GSAlignedClass.h" -class GPUDrawScanline : public GSAlignedClass<16>, public IDrawScanline +class GPUDrawScanline : public IDrawScanline { GPUScanlineEnvironment m_env; diff --git a/plugins/GSdx/GSAlignedClass.h b/plugins/GSdx/GSAlignedClass.h index e17e36159e..d684e6d79c 100644 --- a/plugins/GSdx/GSAlignedClass.h +++ b/plugins/GSdx/GSAlignedClass.h @@ -25,9 +25,8 @@ template class GSAlignedClass { public: GSAlignedClass() {} + virtual ~GSAlignedClass() {} - // never put a destructor here, breaks the member callbacks of GSDrawScanline which also inherits IDrawScanline - void* operator new (size_t size) { return _aligned_malloc(size, i); diff --git a/plugins/GSdx/GSDrawScanline.h b/plugins/GSdx/GSDrawScanline.h index 9253f322bd..eec1388d92 100644 --- a/plugins/GSdx/GSDrawScanline.h +++ b/plugins/GSdx/GSDrawScanline.h @@ -26,9 +26,8 @@ #include "GSScanlineEnvironment.h" #include "GSSetupPrimCodeGenerator.h" #include "GSDrawScanlineCodeGenerator.h" -#include "GSAlignedClass.h" -class GSDrawScanline : public GSAlignedClass<16>, public IDrawScanline +class GSDrawScanline : public IDrawScanline { GSScanlineEnvironment m_env; GSScanlineSelector m_sel; diff --git a/plugins/GSdx/GSRasterizer.h b/plugins/GSdx/GSRasterizer.h index 00a2009baf..b1063b45c9 100644 --- a/plugins/GSdx/GSRasterizer.h +++ b/plugins/GSdx/GSRasterizer.h @@ -25,6 +25,7 @@ #include "GSVertexSW.h" #include "GSFunctionMap.h" #include "GSThread.h" +#include "GSAlignedClass.h" __declspec(align(16)) class GSRasterizerData { @@ -46,7 +47,7 @@ public: virtual void PrintStats() = 0; }; -class IDrawScanline +class IDrawScanline : public GSAlignedClass<16> { public: typedef void (__fastcall *DrawScanlineStaticPtr)(int right, int left, int top, const GSVertexSW& v);