Skip to content

Commit bc123e4

Browse files
committed
xrGame/UIZoneMap.cpp: removed excessive static member access through instance
1 parent c7ffff8 commit bc123e4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/xrGame/UIZoneMap.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ void CUIZoneMap::Init()
2525
CUIXml uiXml;
2626
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "zone_map.xml");
2727

28-
CUIXmlInit xml_init;
29-
xml_init.InitStatic(uiXml, "minimap:background", 0, &m_background);
30-
xml_init.InitWindow(uiXml, "minimap:level_frame", 0, &m_clipFrame);
31-
xml_init.InitStatic(uiXml, "minimap:center", 0, &m_center);
28+
CUIXmlInit::InitStatic(uiXml, "minimap:background", 0, &m_background);
29+
CUIXmlInit::InitWindow(uiXml, "minimap:level_frame", 0, &m_clipFrame);
30+
CUIXmlInit::InitStatic(uiXml, "minimap:center", 0, &m_center);
3231

3332
m_clock_wnd = UIHelper::CreateStatic(uiXml, "minimap:clock_wnd", &m_background);
3433

@@ -37,7 +36,7 @@ void CUIZoneMap::Init()
3736
m_activeMap->SetAutoDelete(true);
3837

3938
m_activeMap->EnableHeading(true);
40-
xml_init.InitStatic(uiXml, "minimap:compass", 0, &m_compass);
39+
CUIXmlInit::InitStatic(uiXml, "minimap:compass", 0, &m_compass);
4140
m_background.AttachChild(&m_compass);
4241

4342
m_clipFrame.AttachChild(&m_center);
@@ -82,9 +81,9 @@ void CUIZoneMap::Init()
8281

8382
if (IsGameTypeSingle())
8483
{
85-
xml_init.InitStatic(uiXml, "minimap:static_counter", 0, &m_Counter);
84+
CUIXmlInit::InitStatic(uiXml, "minimap:static_counter", 0, &m_Counter);
8685
m_background.AttachChild(&m_Counter);
87-
xml_init.InitTextWnd(uiXml, "minimap:static_counter:text_static", 0, &m_Counter_text);
86+
CUIXmlInit::InitTextWnd(uiXml, "minimap:static_counter:text_static", 0, &m_Counter_text);
8887
m_Counter.AttachChild(&m_Counter_text);
8988

9089
rel_pos = m_Counter.GetWndPos();

0 commit comments

Comments
 (0)