From 04cc300019a7f501c1835c835ce62bc2fb7e4eec Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Sep 2019 21:46:08 -0400 Subject: [PATCH] CGuiWidgetDrawParms: Mark Default instance as const This isn't ever modified, so it can be made const to prevent unintentional modification (and allow it to be placed within the RO segment). --- Runtime/GuiSys/CGuiWidgetDrawParms.cpp | 2 +- Runtime/GuiSys/CGuiWidgetDrawParms.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/GuiSys/CGuiWidgetDrawParms.cpp b/Runtime/GuiSys/CGuiWidgetDrawParms.cpp index 58df7407a..be3bc6e81 100644 --- a/Runtime/GuiSys/CGuiWidgetDrawParms.cpp +++ b/Runtime/GuiSys/CGuiWidgetDrawParms.cpp @@ -1,5 +1,5 @@ #include "CGuiWidgetDrawParms.hpp" namespace urde { -CGuiWidgetDrawParms CGuiWidgetDrawParms::Default = {}; +const CGuiWidgetDrawParms CGuiWidgetDrawParms::Default = {}; } diff --git a/Runtime/GuiSys/CGuiWidgetDrawParms.hpp b/Runtime/GuiSys/CGuiWidgetDrawParms.hpp index 4ee7b0be8..ebf3b184d 100644 --- a/Runtime/GuiSys/CGuiWidgetDrawParms.hpp +++ b/Runtime/GuiSys/CGuiWidgetDrawParms.hpp @@ -11,7 +11,7 @@ struct CGuiWidgetDrawParms { CGuiWidgetDrawParms() = default; CGuiWidgetDrawParms(float alphaMod, const zeus::CVector3f& cameraOff) : x0_alphaMod(alphaMod), x4_cameraOffset(cameraOff) {} - static CGuiWidgetDrawParms Default; + static const CGuiWidgetDrawParms Default; }; } // namespace urde