- removed the needless copying around of the vertexdatas array. The slope code can just use this from the TArray created by the UDMF parser.

This commit is contained in:
Christoph Oelckers 2017-01-09 01:40:14 +01:00
commit 472ace1bea
4 changed files with 7 additions and 17 deletions

View file

@ -394,7 +394,6 @@ class UDMFParser : public UDMFParserBase
TArray<intmapsidedef_t> ParsedSideTextures;
TArray<sector_t> ParsedSectors;
TArray<vertex_t> ParsedVertices;
TArray<vertexdata_t> ParsedVertexDatas;
FDynamicColormap *fogMap, *normMap;
FMissingTextureTracker &missingTex;
@ -1996,7 +1995,7 @@ public:
vertexdata_t vd;
ParseVertex(&vt, &vd);
ParsedVertices.Push(vt);
ParsedVertexDatas.Push(vd);
vertexdatas.Push(vd);
}
else
{
@ -2014,11 +2013,6 @@ public:
level.vertexes.Alloc(ParsedVertices.Size());
memcpy(&level.vertexes[0], &ParsedVertices[0], level.vertexes.Size() * sizeof(vertex_t));
// Create the real vertex datas
numvertexdatas = ParsedVertexDatas.Size();
vertexdatas = new vertexdata_t[numvertexdatas];
memcpy(vertexdatas, &ParsedVertexDatas[0], numvertexdatas * sizeof(*vertexdatas));
// Create the real sectors
level.sectors.Alloc(ParsedSectors.Size());
memcpy(&level.sectors[0], &ParsedSectors[0], level.sectors.Size() * sizeof(sector_t));