From b52d1c3d507efabe4d59019f4176654d2b2da4c1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 12 Mar 2017 20:04:46 +0100 Subject: [PATCH] - some cleanup. --- src/g_shared/a_dynlightdata.cpp | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/src/g_shared/a_dynlightdata.cpp b/src/g_shared/a_dynlightdata.cpp index 030731745..bf4a8cad1 100644 --- a/src/g_shared/a_dynlightdata.cpp +++ b/src/g_shared/a_dynlightdata.cpp @@ -150,7 +150,7 @@ protected: bool m_swapped = false; }; -TArray LightDefaults; +TDeletingArray LightDefaults; //----------------------------------------------------------------------------- // @@ -870,25 +870,6 @@ void ParseObject(FScanner &sc) } -//----------------------------------------------------------------------------- -// -// -// -//----------------------------------------------------------------------------- - -static void ReleaseLights() -{ - unsigned int i; - - for (i = 0; i < LightDefaults.Size(); i++) - { - delete LightDefaults[i]; - } - - LightAssociations.Clear(); - LightDefaults.Clear(); -} - //========================================================================== // // @@ -945,7 +926,7 @@ enum // There is no functionality for this stuff! // //========================================================================== -bool _gl_ParseShader(FScanner &sc) +bool ParseShader(FScanner &sc) { int ShaderDepth = 0; @@ -1281,7 +1262,7 @@ static void DoParseDefs(FScanner &sc, int workingLump) // This has been intentionally removed break; case TAG_SHADER: - _gl_ParseShader(sc); + ParseShader(sc); break; case TAG_CLEARSHADERS: break; @@ -1346,8 +1327,8 @@ void ParseGLDefs() { const char *defsLump = NULL; - atterm(ReleaseLights ); - ReleaseLights(); + LightAssociations.Clear(); + LightDefaults.Clear(); gl_DestroyUserShaders(); switch (gameinfo.gametype) {