further remove manual memory management

This commit is contained in:
Ricardo Luís Vaz Silva 2025-04-16 23:36:57 -03:00
commit a43b99bf51
9 changed files with 36 additions and 45 deletions

View file

@ -212,11 +212,11 @@ namespace swrenderer
auto flatLightList = Level->lightlists.flat_dlist.CheckKey(vis->section);
if (flatLightList)
{
TMap<FDynamicLight *, FLightNode *>::Iterator it(*flatLightList);
TMap<FDynamicLight *, FLightNode *>::Pair *pair;
TMap<FDynamicLight *, std::unique_ptr<FLightNode>>::Iterator it(*flatLightList);
TMap<FDynamicLight *, std::unique_ptr<FLightNode>>::Pair *pair;
while (it.NextPair(pair))
{
auto node = pair->Value;
auto node = pair->Value.get();
if (!node) continue;
FDynamicLight *light = node->lightsource;