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
This commit is contained in:
gabest11 2009-07-05 00:18:33 +00:00
parent 2ed180d7c0
commit fad91c7ebf
4 changed files with 5 additions and 7 deletions

View File

@ -26,9 +26,8 @@
#include "GPUScanlineEnvironment.h" #include "GPUScanlineEnvironment.h"
#include "GPUSetupPrimCodeGenerator.h" #include "GPUSetupPrimCodeGenerator.h"
#include "GPUDrawScanlineCodeGenerator.h" #include "GPUDrawScanlineCodeGenerator.h"
#include "GSAlignedClass.h"
class GPUDrawScanline : public GSAlignedClass<16>, public IDrawScanline class GPUDrawScanline : public IDrawScanline
{ {
GPUScanlineEnvironment m_env; GPUScanlineEnvironment m_env;

View File

@ -25,9 +25,8 @@ template<int i> class GSAlignedClass
{ {
public: public:
GSAlignedClass() {} GSAlignedClass() {}
virtual ~GSAlignedClass() {}
// never put a destructor here, breaks the member callbacks of GSDrawScanline which also inherits IDrawScanline
void* operator new (size_t size) void* operator new (size_t size)
{ {
return _aligned_malloc(size, i); return _aligned_malloc(size, i);

View File

@ -26,9 +26,8 @@
#include "GSScanlineEnvironment.h" #include "GSScanlineEnvironment.h"
#include "GSSetupPrimCodeGenerator.h" #include "GSSetupPrimCodeGenerator.h"
#include "GSDrawScanlineCodeGenerator.h" #include "GSDrawScanlineCodeGenerator.h"
#include "GSAlignedClass.h"
class GSDrawScanline : public GSAlignedClass<16>, public IDrawScanline class GSDrawScanline : public IDrawScanline
{ {
GSScanlineEnvironment m_env; GSScanlineEnvironment m_env;
GSScanlineSelector m_sel; GSScanlineSelector m_sel;

View File

@ -25,6 +25,7 @@
#include "GSVertexSW.h" #include "GSVertexSW.h"
#include "GSFunctionMap.h" #include "GSFunctionMap.h"
#include "GSThread.h" #include "GSThread.h"
#include "GSAlignedClass.h"
__declspec(align(16)) class GSRasterizerData __declspec(align(16)) class GSRasterizerData
{ {
@ -46,7 +47,7 @@ public:
virtual void PrintStats() = 0; virtual void PrintStats() = 0;
}; };
class IDrawScanline class IDrawScanline : public GSAlignedClass<16>
{ {
public: public:
typedef void (__fastcall *DrawScanlineStaticPtr)(int right, int left, int top, const GSVertexSW& v); typedef void (__fastcall *DrawScanlineStaticPtr)(int right, int left, int top, const GSVertexSW& v);