Browse files

profile: MULTI_INFO is hit ~75% of the time, make it the first check

  • Loading branch information...
1 parent 19082aa commit dd07646c11ee0a4fa4e4820cf96745ad4320a042 Cory Fields committed Nov 21, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 xbmc/GUIInfoManager.cpp
View
6 xbmc/GUIInfoManager.cpp
@@ -2045,6 +2045,8 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
bool bReturn = false;
int condition = abs(condition1);
+ if (condition >= MULTI_INFO_START && condition <= MULTI_INFO_END)
+ return GetMultiInfoBool(m_multiInfo[condition - MULTI_INFO_START], contextWindow, item);
if (item && condition >= LISTITEM_START && condition < LISTITEM_END)
bReturn = GetItemBool(item, condition);
// Ethernet Link state checking
@@ -2145,10 +2147,6 @@ bool CGUIInfoManager::GetBool(int condition1, int contextWindow, const CGUIListI
bReturn = m_playerShowInfo;
else if (condition == PLAYER_SHOWCODEC)
bReturn = m_playerShowCodec;
- else if (condition >= MULTI_INFO_START && condition <= MULTI_INFO_END)
- {
- return GetMultiInfoBool(m_multiInfo[condition - MULTI_INFO_START], contextWindow, item);
- }
else if (condition == SYSTEM_HASLOCKS)
bReturn = g_settings.GetMasterProfile().getLockMode() != LOCK_MODE_EVERYONE;
else if (condition == SYSTEM_HAS_PVR)

0 comments on commit dd07646

Please sign in to comment.