aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgyunaev <gyunaev@svn>2010-03-27 22:13:15 +0000
committergyunaev <gyunaev@svn>2010-03-27 22:13:15 +0000
commit605420fa0219b7c18ebb96fe48a5646159b8d8bc (patch)
tree5c423de980d516b0613e31c7e45c8820a4dc7a46
parentef409dbbac288716d01c47126e7a8b129b1eac66 (diff)
Using StringUtils::TimeStringToSeconds() instead of handwritten one.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28900 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
-rw-r--r--xbmc/utils/GUIInfoManager.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/xbmc/utils/GUIInfoManager.cpp b/xbmc/utils/GUIInfoManager.cpp
index afd561bb83..6e488208f1 100644
--- a/xbmc/utils/GUIInfoManager.cpp
+++ b/xbmc/utils/GUIInfoManager.cpp
@@ -2097,42 +2097,7 @@ bool CGUIInfoManager::GetMultiInfoBool(const GUIInfo &info, int contextWindow, c
// Handle the case when a value contains time separator (:). This makes IntegerGreaterThan
// useful for Player.Time* members without adding a separate set of members returning time in seconds
if ( value.find_first_of( ':' ) )
- {
- CStdStringArray times;
- StringUtils::SplitString( value, ":", times );
- int time_value = 0;
-
- for ( unsigned int i = 0; i < times.size(); i++ )
- {
- // Parse the value backwards
- int tval = atoi( times[ times.size() - 1 - i ] );
-
- switch ( i )
- {
- case 0: // seconds
- time_value += tval;
- break;
-
- case 1: // minutes
- time_value += tval * 60;
- break;
-
- case 2: // hours
- time_value += tval * 3600;
- break;
-
- case 3: // days?
- time_value += tval * 86400;
- break;
-
- default:
- CLog::Log( LOGERROR, "INTEGER_GREATER_THAN cannot handle larger values than day" );
- break;
- }
- }
-
- bReturn = time_value > info.GetData2();
- }
+ bReturn = StringUtils::TimeStringToSeconds( value ) > info.GetData2();
else
bReturn = atoi( value.c_str() ) > info.GetData2();
}