From c8be142846f1083f19d583b421f58f3b0d4d30ea Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 13 Apr 2020 14:52:31 -0400 Subject: [PATCH] CHudDecoInterface: Make virtual calls in constructor explicitly qualified Virtual functions called in a constructor or destructor are statically resolved. Given this is a potential source of bugs, we qualify these functions to make it explicit that this is indeed the kind of behavior desired. --- Runtime/GuiSys/CHudDecoInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Runtime/GuiSys/CHudDecoInterface.cpp b/Runtime/GuiSys/CHudDecoInterface.cpp index d85df6618..c709ca9d3 100644 --- a/Runtime/GuiSys/CHudDecoInterface.cpp +++ b/Runtime/GuiSys/CHudDecoInterface.cpp @@ -34,7 +34,7 @@ CHudDecoInterfaceCombat::CHudDecoInterfaceCombat(CGuiFrame& selHud) { x78_basewidget_tickdeco0->SetColor(g_tweakGuiColors->GetTickDecoColor()); x38_basePosition = x7c_basewidget_frame->GetLocalPosition(); x44_baseRotation = x7c_basewidget_frame->GetLocalTransform().buildMatrix3f(); - UpdateHudAlpha(); + CHudDecoInterfaceCombat::UpdateHudAlpha(); } void CHudDecoInterfaceCombat::UpdateVisibility() { @@ -127,7 +127,7 @@ CHudDecoInterfaceScan::CHudDecoInterfaceScan(CGuiFrame& selHud) : x14_selHud(sel x250_basewidget_rightside->SetLocalPosition(x250_basewidget_rightside->RotateO2P(x224_rightsidePosition - sidesPos)); x234_sidesPositioner = FLT_MAX; - UpdateHudAlpha(); + CHudDecoInterfaceScan::UpdateHudAlpha(); } void CHudDecoInterfaceScan::UpdateVisibility() { @@ -377,7 +377,7 @@ CHudDecoInterfaceXRay::CHudDecoInterfaceXRay(CGuiFrame& selHud) { if (CGuiWidget* w = selHud.FindWidget("model_threatslider")) w->SetDepthWrite(true); - UpdateHudAlpha(); + CHudDecoInterfaceXRay::UpdateHudAlpha(); } void CHudDecoInterfaceXRay::UpdateVisibility() {