Skip to content

Commit

Permalink
IntegerGreaterThan use GetInt (saves int -> string -> int conversion)
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Sep 5, 2011
1 parent 1af901e commit 9b9e6f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xbmc/GUIInfoManager.cpp
Expand Up @@ -2214,6 +2214,11 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
break;
case INTEGER_GREATER_THAN:
{
int integer;
if (GetInt(integer, info.GetData1(), contextWindow, item))
bReturn = integer > info.GetData2();
else
{
CStdString value;

if (item && item->IsFileItem() && info.GetData1() >= LISTITEM_START && info.GetData1() < LISTITEM_END)
Expand All @@ -2227,6 +2232,7 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
bReturn = StringUtils::TimeStringToSeconds( value ) > info.GetData2();
else
bReturn = atoi( value.c_str() ) > info.GetData2();
}
}
break;
case STRING_STR:
Expand Down

0 comments on commit 9b9e6f9

Please sign in to comment.