From 9b52c18ef6139f19d26151114bbbbb059f12c2c1 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 13 Jan 2018 12:44:23 +0200 Subject: [PATCH] Improved layout of FMultiPatchTexture::TexPart structure Removed "gaps" between members (for 64-bit targets) and initialized them in place --- src/textures/multipatchtexture.cpp | 34 +++++++----------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/src/textures/multipatchtexture.cpp b/src/textures/multipatchtexture.cpp index f6b3f3302..46b652e29 100644 --- a/src/textures/multipatchtexture.cpp +++ b/src/textures/multipatchtexture.cpp @@ -175,15 +175,14 @@ protected: struct TexPart { - int16_t OriginX, OriginY; - uint8_t Rotate; - uint8_t op; - FRemapTable *Translation; - PalEntry Blend; - FTexture *Texture; - blend_t Alpha; - - TexPart(); + FRemapTable *Translation = nullptr; + FTexture *Texture = nullptr; + PalEntry Blend = 0; + blend_t Alpha = FRACUNIT; + int16_t OriginX = 0; + int16_t OriginY = 0; + uint8_t Rotate = 0; + uint8_t op = OP_COPY; }; struct TexInit @@ -797,23 +796,6 @@ FTexture *FMultiPatchTexture::GetRawTexture() return NumParts == 1 ? Parts->Texture : this; } -//========================================================================== -// -// FMultiPatchTexture :: TexPart :: TexPart -// -//========================================================================== - -FMultiPatchTexture::TexPart::TexPart() -{ - OriginX = OriginY = 0; - Rotate = 0; - Texture = NULL; - Translation = NULL; - Blend = 0; - Alpha = FRACUNIT; - op = OP_COPY; -} - //========================================================================== // // FTextureManager :: AddTexturesLump