From 3a6f186aa0a124bd7f3a3b3ee67e32e8ff833e7a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 31 Oct 2018 11:51:52 +0100 Subject: [PATCH] - removed memcpy workarounds from GLWall, GLFlat and GLSprite after making sure that all 3 are trivially copyable. --- src/hwrenderer/scene/hw_drawstructs.h | 40 --------------------------- 1 file changed, 40 deletions(-) diff --git a/src/hwrenderer/scene/hw_drawstructs.h b/src/hwrenderer/scene/hw_drawstructs.h index 67e2017c5..38514a6bf 100644 --- a/src/hwrenderer/scene/hw_drawstructs.h +++ b/src/hwrenderer/scene/hw_drawstructs.h @@ -271,19 +271,6 @@ public: void DrawDecalsForMirror(HWDrawInfo *di, FRenderState &state, TArray &decals); public: - GLWall() {} - - GLWall(const GLWall &other) - { - memcpy(this, &other, sizeof(GLWall)); - } - - GLWall & operator=(const GLWall &other) - { - memcpy(this, &other, sizeof(GLWall)); - return *this; - } - void Process(HWDrawInfo *di, seg_t *seg, sector_t *frontsector, sector_t *backsector); void ProcessLowerMiniseg(HWDrawInfo *di, seg_t *seg, sector_t *frontsector, sector_t *backsector); @@ -334,20 +321,6 @@ public: void DrawSubsectors(HWDrawInfo *di, FRenderState &state); void DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent); - - GLFlat() {} - - GLFlat(const GLFlat &other) - { - memcpy(this, &other, sizeof(GLFlat)); - } - - GLFlat & operator=(const GLFlat &other) - { - memcpy(this, &other, sizeof(GLFlat)); - return *this; - } - }; //========================================================================== @@ -401,25 +374,12 @@ public: public: - GLSprite() = default; void CreateVertices(HWDrawInfo *di); void PutSprite(HWDrawInfo *di, bool translucent); void Process(HWDrawInfo *di, AActor* thing,sector_t * sector, area_t in_area, int thruportal = false); void ProcessParticle (HWDrawInfo *di, particle_t *particle, sector_t *sector);//, int shade, int fakeside) void DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent); - - GLSprite(const GLSprite &other) - { - memcpy(this, &other, sizeof(GLSprite)); - } - - GLSprite & operator=(const GLSprite &other) - { - memcpy(this, &other, sizeof(GLSprite)); - return *this; - } - };