PlaylistFile: remove obsolete function TranslatePlaylistError()

This commit is contained in:
Max Kellermann
2015-12-26 07:05:00 +01:00
parent 48693250a4
commit db5a691693
2 changed files with 0 additions and 26 deletions

View File

@@ -126,29 +126,6 @@ spl_map_to_fs(const char *name_utf8, Error &error)
return path_fs; 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. * Create an #Error for the current errno.
*/ */

View File

@@ -49,9 +49,6 @@ spl_valid_name(const char *name_utf8);
AllocatedPath AllocatedPath
spl_map_to_fs(const char *name_utf8, Error &error); spl_map_to_fs(const char *name_utf8, Error &error);
void
TranslatePlaylistError(Error &error);
/** /**
* Returns a list of stored_playlist_info struct pointers. Returns * Returns a list of stored_playlist_info struct pointers. Returns
* nullptr if an error occurred. * nullptr if an error occurred.