File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Generals/Code/GameEngine/Include/Common
GeneralsMD/Code/GameEngine/Include/Common Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -560,6 +560,11 @@ class GlobalData : public SubsystemInterface
560
560
// singleton
561
561
extern GlobalData* TheWritableGlobalData;
562
562
563
+ // use TheGlobalData for all read-only accesses
564
+ #if __cplusplus >= 201703L
565
+ inline const GlobalData* const & TheGlobalData = TheWritableGlobalData;
566
+ #else
563
567
#define TheGlobalData ((const GlobalData*)TheWritableGlobalData)
568
+ #endif
564
569
565
570
#endif
Original file line number Diff line number Diff line change @@ -573,6 +573,11 @@ class GlobalData : public SubsystemInterface
573
573
// singleton
574
574
extern GlobalData* TheWritableGlobalData;
575
575
576
+ // use TheGlobalData for all read-only accesses
577
+ #if __cplusplus >= 201703L
578
+ inline const GlobalData* const & TheGlobalData = TheWritableGlobalData;
579
+ #else
576
580
#define TheGlobalData ((const GlobalData*)TheWritableGlobalData)
581
+ #endif
577
582
578
583
#endif
You can’t perform that action at this time.
0 commit comments