File tree 3 files changed +13
-1
lines changed
GeneralsMD/Code/GameEngine
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -531,9 +531,14 @@ class GlobalData : public SubsystemInterface
531
531
GlobalData *newOverride ( void ); /* * create a new override, copy data from previous
532
532
override, and return it */
533
533
534
-
534
+ // TheSuperHackers @compilerwarning fix Mauller 28/03/2025 incomplete copy constructors causing uninitialised variable warnings in compilation.
535
+ #if defined(_MSC_VER) && _MSC_VER < 1300
535
536
GlobalData (const GlobalData& that) { DEBUG_CRASH ((" unimplemented" )); }
536
537
GlobalData& operator =(const GlobalData& that) { DEBUG_CRASH ((" unimplemented" )); return *this ; }
538
+ #else
539
+ GlobalData (const GlobalData& that) = delete;
540
+ GlobalData& operator =(const GlobalData& that) = default ; // Copy constructor is actually used by the new override function.
541
+ #endif
537
542
538
543
};
539
544
Original file line number Diff line number Diff line change @@ -351,10 +351,16 @@ class ThingTemplate : public Overridable
351
351
MEMORY_POOL_GLUE_WITH_USERLOOKUP_CREATE (ThingTemplate, " ThingTemplatePool" )
352
352
353
353
private:
354
+
355
+ // TheSuperHackers @compilerwarning fix Mauller 28/03/2025 incomplete copy constructors causing uninitialised variable warnings in compilation.
356
+ #if defined(_MSC_VER) && _MSC_VER < 1300
354
357
ThingTemplate (const ThingTemplate& that) : m_geometryInfo(that.m_geometryInfo)
355
358
{
356
359
DEBUG_CRASH ((" This should never be called\n " ));
357
360
}
361
+ #else
362
+ ThingTemplate (const ThingTemplate& that) = delete;
363
+ #endif
358
364
359
365
public:
360
366
Original file line number Diff line number Diff line change @@ -1129,6 +1129,7 @@ Bool GlobalData::setTimeOfDay( TimeOfDay tod )
1129
1129
// -------------------------------------------------------------------------------------------------
1130
1130
GlobalData *GlobalData::newOverride ( void )
1131
1131
{
1132
+ // TheSuperHackers @info This copy is not implemented in VS6 builds
1132
1133
GlobalData *override = NEW GlobalData;
1133
1134
1134
1135
// copy the data from the latest override (TheWritableGlobalData) to the newly created instance
You can’t perform that action at this time.
0 commit comments