PlaylistFile: remove obsolete function TranslatePlaylistError()
This commit is contained in:
@@ -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.
|
||||||
*/
|
*/
|
||||||
|
@@ -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.
|
||||||
|
Reference in New Issue
Block a user