Specify behaviour of Id3Genres::indexFromString() in error case

This commit is contained in:
Martchus 2017-06-03 20:58:22 +02:00
parent e1d14ad61b
commit 8ae3dd6f6f
1 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ const char **Id3Genres::genreNames()
} }
/*! /*!
* \brief Returns the numerical denotation of the specified \a genre. * \brief Returns the numerical denotation of the specified \a genre or -1 if \a genre is unknown.
*/ */
int Id3Genres::indexFromString(const string &genre) int Id3Genres::indexFromString(const string &genre)
{ {
@ -57,7 +57,7 @@ int Id3Genres::indexFromString(const string &genre)
return index; return index;
} }
} }
return 0; return -1;
} }
} }