make ncmpcpp compile with -fno-exceptions

This commit is contained in:
Andrzej Rybczak
2009-09-21 06:01:21 +02:00
parent 14a774b8a3
commit 70910b77ed
12 changed files with 135 additions and 70 deletions

View File

@@ -1535,11 +1535,7 @@ int main(int argc, char *argv[])
int newpos = 0;
if (position.find(':') != std::string::npos) // probably time in mm:ss
{
try
{
newpos = StrToInt(position)*60 + StrToInt(position.substr(position.find(':')+1));
}
catch (std::out_of_range) { }
newpos = StrToInt(position)*60 + StrToInt(position.substr(position.find(':')+1));
if (newpos >= 0 && newpos <= Mpd.GetTotalTime())
Mpd.Seek(newpos);
else