Skip to content

Commit

Permalink
xrGame/UIZoneMap.cpp: removed excessive static member access through …
Browse files Browse the repository at this point in the history
…instance
  • Loading branch information
Xottab-DUTY committed Nov 3, 2018
1 parent c7ffff8 commit bc123e4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/xrGame/UIZoneMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,9 @@ void CUIZoneMap::Init()
CUIXml uiXml;
uiXml.Load(CONFIG_PATH, UI_PATH, UI_PATH_DEFAULT, "zone_map.xml");

CUIXmlInit xml_init;
xml_init.InitStatic(uiXml, "minimap:background", 0, &m_background);
xml_init.InitWindow(uiXml, "minimap:level_frame", 0, &m_clipFrame);
xml_init.InitStatic(uiXml, "minimap:center", 0, &m_center);
CUIXmlInit::InitStatic(uiXml, "minimap:background", 0, &m_background);
CUIXmlInit::InitWindow(uiXml, "minimap:level_frame", 0, &m_clipFrame);
CUIXmlInit::InitStatic(uiXml, "minimap:center", 0, &m_center);

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

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

m_activeMap->EnableHeading(true);
xml_init.InitStatic(uiXml, "minimap:compass", 0, &m_compass);
CUIXmlInit::InitStatic(uiXml, "minimap:compass", 0, &m_compass);
m_background.AttachChild(&m_compass);

m_clipFrame.AttachChild(&m_center);
Expand Down Expand Up @@ -82,9 +81,9 @@ void CUIZoneMap::Init()

if (IsGameTypeSingle())
{
xml_init.InitStatic(uiXml, "minimap:static_counter", 0, &m_Counter);
CUIXmlInit::InitStatic(uiXml, "minimap:static_counter", 0, &m_Counter);
m_background.AttachChild(&m_Counter);
xml_init.InitTextWnd(uiXml, "minimap:static_counter:text_static", 0, &m_Counter_text);
CUIXmlInit::InitTextWnd(uiXml, "minimap:static_counter:text_static", 0, &m_Counter_text);
m_Counter.AttachChild(&m_Counter_text);

rel_pos = m_Counter.GetWndPos();
Expand Down

0 comments on commit bc123e4

Please sign in to comment.