remove redundant check in MPD::Song::SetHashAndSlash()

http is already filtered out with isStream() function
This commit is contained in:
Andrzej Rybczak
2009-08-14 16:59:41 +02:00
parent 25deec013c
commit d2ffdc2bb5

View File

@@ -453,7 +453,7 @@ void MPD::Song::SetHashAndSlash()
if (!isStream())
{
const char *tmp = strrchr(itsSong->file, '/');
itsSlash = tmp && *(tmp-1) != '/' /* no http:// */ ? tmp-itsSong->file : std::string::npos;
itsSlash = tmp ? tmp-itsSong->file : std::string::npos;
}
itsHash = calc_hash(itsSong->file);
}