From deed1bb97144b14fd4687de7702e2995173cf787 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Fri, 23 Feb 2024 12:04:05 -0500 Subject: [PATCH] Match --- LEGO1/lego/sources/misc/legocontainer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/LEGO1/lego/sources/misc/legocontainer.cpp b/LEGO1/lego/sources/misc/legocontainer.cpp index 558526dd..f89b88ad 100644 --- a/LEGO1/lego/sources/misc/legocontainer.cpp +++ b/LEGO1/lego/sources/misc/legocontainer.cpp @@ -18,6 +18,7 @@ LegoTextureInfo* LegoTextureContainer::Insert(LegoTextureInfo* p_textureInfo) { DDSURFACEDESC desc, newDesc; DWORD width, height; + LegoTextureInfo* textureInfo; memset(&desc, 0, sizeof(desc)); desc.dwSize = sizeof(desc); @@ -27,14 +28,10 @@ LegoTextureInfo* LegoTextureContainer::Insert(LegoTextureInfo* p_textureInfo) p_textureInfo->m_surface->Unlock(desc.lpSurface); } -#ifdef COMPAT_MODE LegoTextureList::iterator it; for (it = m_list.begin(); it != m_list.end(); it++) { -#else - for (LegoTextureList::iterator it = m_list.begin(); it != m_list.end(); it++) { -#endif if ((*it).second == FALSE) { - LegoTextureInfo* textureInfo = (*it).first; + textureInfo = (*it).first; if (textureInfo->m_texture->AddRef() != 0 && textureInfo->m_texture->Release() == 1) { if (!strcmp(textureInfo->m_name, p_textureInfo->m_name)) { @@ -60,7 +57,7 @@ LegoTextureInfo* LegoTextureContainer::Insert(LegoTextureInfo* p_textureInfo) } } - LegoTextureInfo* textureInfo = new LegoTextureInfo(); + textureInfo = new LegoTextureInfo(); textureInfo->m_palette = p_textureInfo->m_palette; p_textureInfo->m_palette->Release();