From 99dfc7129baca431666e6534dcad763321929d67 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:41:46 +0200 Subject: [PATCH 1/2] refactor(utils): Move STLUtils.h to WWLib --- Core/GameEngine/CMakeLists.txt | 1 - Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt | 1 + .../Include/Common => Libraries/Source/WWVegas/WWLib}/STLUtils.h | 0 Core/Libraries/Source/WWVegas/WWLib/WWCommon.h | 1 + Generals/Code/GameEngine/Include/Common/STLTypedefs.h | 1 - GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h | 1 - 6 files changed, 2 insertions(+), 3 deletions(-) rename Core/{GameEngine/Include/Common => Libraries/Source/WWVegas/WWLib}/STLUtils.h (100%) diff --git a/Core/GameEngine/CMakeLists.txt b/Core/GameEngine/CMakeLists.txt index f713e0a0ab..43460b8ecf 100644 --- a/Core/GameEngine/CMakeLists.txt +++ b/Core/GameEngine/CMakeLists.txt @@ -114,7 +114,6 @@ set(GAMEENGINE_SRC # Include/Common/StateMachine.h # Include/Common/StatsCollector.h # Include/Common/STLTypedefs.h - Include/Common/STLUtils.h Include/Common/StreamingArchiveFile.h # Include/Common/SubsystemInterface.h # Include/Common/SystemInfo.h diff --git a/Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt b/Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt index b81bac059b..99ae03ab2e 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt +++ b/Core/Libraries/Source/WWVegas/WWLib/CMakeLists.txt @@ -106,6 +106,7 @@ set(WWLIB_SRC SLNODE.H stimer.cpp stimer.h + STLUtils.h straw.cpp STRAW.H stringex.h diff --git a/Core/GameEngine/Include/Common/STLUtils.h b/Core/Libraries/Source/WWVegas/WWLib/STLUtils.h similarity index 100% rename from Core/GameEngine/Include/Common/STLUtils.h rename to Core/Libraries/Source/WWVegas/WWLib/STLUtils.h diff --git a/Core/Libraries/Source/WWVegas/WWLib/WWCommon.h b/Core/Libraries/Source/WWVegas/WWLib/WWCommon.h index 329324ca51..77c231a6d5 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/WWCommon.h +++ b/Core/Libraries/Source/WWVegas/WWLib/WWCommon.h @@ -18,6 +18,7 @@ #pragma once +#include "STLUtils.h" #include "stringex.h" diff --git a/Generals/Code/GameEngine/Include/Common/STLTypedefs.h b/Generals/Code/GameEngine/Include/Common/STLTypedefs.h index 28d42fe512..6a6b7c9d2c 100644 --- a/Generals/Code/GameEngine/Include/Common/STLTypedefs.h +++ b/Generals/Code/GameEngine/Include/Common/STLTypedefs.h @@ -58,7 +58,6 @@ class STLSpecialAlloc; #include "Common/UnicodeString.h" #include "Common/GameCommon.h" #include "Common/GameMemory.h" -#include "Common/STLUtils.h" //----------------------------------------------------------------------------- diff --git a/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h b/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h index d3ed133b23..939d27af6b 100644 --- a/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h +++ b/GeneralsMD/Code/GameEngine/Include/Common/STLTypedefs.h @@ -58,7 +58,6 @@ class STLSpecialAlloc; #include "Common/UnicodeString.h" #include "Common/GameCommon.h" #include "Common/GameMemory.h" -#include "Common/STLUtils.h" //----------------------------------------------------------------------------- From e8b190ebfddf023cacf92a99fc60aefdbd485ba9 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Wed, 8 Oct 2025 20:39:45 +0200 Subject: [PATCH 2/2] Avoid wild VC6 fatal error C1001: INTERNAL COMPILER ERROR --- Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp | 4 ++-- Core/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp | 4 ++-- Generals/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp | 2 +- GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp b/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp index b7f3299361..1fa114bb54 100644 --- a/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp +++ b/Core/Libraries/Source/WWVegas/WW3D2/rendobj.cpp @@ -1243,7 +1243,7 @@ PersistClass * RenderObjPersistFactoryClass::Load(ChunkLoadClass & cload) const // if the object we saved didn't have a name, replace it with null if (strlen(name) == 0) { static int count = 0; - if ( ++count < 10 ) { + if ( count++ < 10 ) { WWDEBUG_SAY(("RenderObjPersistFactory attempted to load an un-named render object!")); WWDEBUG_SAY(("Replacing it with a NULL render object!")); } @@ -1254,7 +1254,7 @@ PersistClass * RenderObjPersistFactoryClass::Load(ChunkLoadClass & cload) const if (new_obj == NULL) { static int count = 0; - if ( ++count < 10 ) { + if ( count++ < 10 ) { WWDEBUG_SAY(("RenderObjPersistFactory failed to create object: %s!!",name)); WWDEBUG_SAY(("Either the asset for this object is gone or you tried to save a procedural object.")); WWDEBUG_SAY(("Replacing it with a NULL render object!")); diff --git a/Core/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp b/Core/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp index 6b30fb8648..b82bff1281 100644 --- a/Core/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp +++ b/Core/Libraries/Source/WWVegas/WWAudio/WWAudio.cpp @@ -372,7 +372,7 @@ WWAudioClass::Get_Sound_Buffer (const char *filename, bool is_3d) buffer = Create_Sound_Buffer (*file, filename, is_3d); } else { static int count = 0; - if ( ++count < 10 ) { + if ( count++ < 10 ) { WWDEBUG_SAY(( "Sound \"%s\" not found", filename )); } } @@ -807,7 +807,7 @@ WWAudioClass::Create_3D_Sound sound_obj->Set_Buffer (buffer); } else { static int count = 0; - if ( ++count < 10 ) { + if ( count++ < 10 ) { WWDEBUG_SAY(( "Sound File not Found \"%s\"", filename )); } } diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp index 9e4a933d95..d7af5da088 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp @@ -1395,7 +1395,7 @@ PersistClass * DazzlePersistFactoryClass::Load(ChunkLoadClass & cload) const */ if (new_obj == NULL) { static int count = 0; - if ( ++count < 10 ) { + if ( count++ < 10 ) { WWDEBUG_SAY(("DazzlePersistFactory failed to create dazzle of type: %s!!",dazzle_type)); WWDEBUG_SAY(("Replacing it with a NULL render object!")); } diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp index d609985123..0a1d64b2bd 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cpp @@ -1498,7 +1498,7 @@ PersistClass * DazzlePersistFactoryClass::Load(ChunkLoadClass & cload) const */ if (new_obj == NULL) { static int count = 0; - if ( ++count < 10 ) { + if ( count++ < 10 ) { WWDEBUG_SAY(("DazzlePersistFactory failed to create dazzle of type: %s!!",dazzle_type)); WWDEBUG_SAY(("Replacing it with a NULL render object!")); }