PlaylistFile: remove obsolete function TranslatePlaylistError()
This commit is contained in:
parent
48693250a4
commit
db5a691693
|
@ -126,29 +126,6 @@ spl_map_to_fs(const char *name_utf8, Error &error)
|
|||
return path_fs;
|
||||
}
|
||||
|
||||
gcc_pure
|
||||
static bool
|
||||
IsNotFoundError(const Error &error)
|
||||
{
|
||||
#ifdef WIN32
|
||||
return error.IsDomain(win32_domain) &&
|
||||
error.GetCode() == ERROR_FILE_NOT_FOUND;
|
||||
#else
|
||||
return error.IsDomain(errno_domain) &&
|
||||
error.GetCode() == ENOENT;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
TranslatePlaylistError(Error &error)
|
||||
{
|
||||
if (IsNotFoundError(error)) {
|
||||
error.Clear();
|
||||
error.Set(playlist_domain, int(PlaylistResult::NO_SUCH_LIST),
|
||||
"No such playlist");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an #Error for the current errno.
|
||||
*/
|
||||
|
|
|
@ -49,9 +49,6 @@ spl_valid_name(const char *name_utf8);
|
|||
AllocatedPath
|
||||
spl_map_to_fs(const char *name_utf8, Error &error);
|
||||
|
||||
void
|
||||
TranslatePlaylistError(Error &error);
|
||||
|
||||
/**
|
||||
* Returns a list of stored_playlist_info struct pointers. Returns
|
||||
* nullptr if an error occurred.
|
||||
|
|
Loading…
Reference in New Issue