Get rid of overloading

This commit is contained in:
twinaphex 2020-09-14 09:58:05 +02:00
parent 4b9a772646
commit 4ab8759468
4 changed files with 8 additions and 9 deletions

View File

@ -3822,7 +3822,7 @@ static void ReadM3U(std::vector<std::string> &file_list, std::string path, unsig
if(linebuf[0] == 0)
continue;
efp = MDFN_EvalFIP(dir_path, std::string(linebuf));
efp = MDFN_EvalFIP(dir_path, std::string(linebuf), false);
if(efp.size() >= 4 && efp.substr(efp.size() - 4) == ".m3u")
{

View File

@ -241,7 +241,7 @@ bool CDAccess_Image::ParseTOCFileLineInfo(CDRFILE_TRACK_INFO *track, const int t
track->FirstFileInstance = 1;
efn = MDFN_EvalFIP(base_dir, filename);
efn = MDFN_EvalFIP(base_dir, filename, false);
if(image_memcache)
track->fp = new MemoryStream(new FileStream(efn.c_str(), MODE_READ));
@ -638,7 +638,7 @@ bool CDAccess_Image::ImageOpen(const char *path, bool image_memcache)
std::string efn;
if(args[0].find("cdrom://") == std::string::npos)
efn = MDFN_EvalFIP(base_dir, args[0]);
efn = MDFN_EvalFIP(base_dir, args[0], false);
else
efn = args[0];

View File

@ -133,11 +133,10 @@ void MDFN_GetFilePathComponents(const std::string &file_path,
std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_path, bool skip_safety_check)
{
char slash;
#ifdef _WIN32
slash = '\\';
char slash = '\\';
#else
slash = '/';
char slash = '/';
#endif
if(!skip_safety_check && !MDFN_IsFIROPSafe(rel_path))
@ -145,8 +144,7 @@ std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_pat
if(IsAbsolutePath(rel_path.c_str()))
return(rel_path);
else
return(dir_path + slash + rel_path);
return(dir_path + slash + rel_path);
}
// Remove whitespace from beginning of string

View File

@ -28,5 +28,6 @@ typedef enum
const char *MDFN_MakeFName(MakeFName_Type type, int id1, const char *cd1);
void MDFN_GetFilePathComponents(const std::string &file_path, std::string *dir_path_out, std::string *file_base_out = NULL, std::string *file_ext_out = NULL);
std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_path, bool skip_safety_check = false);
std::string MDFN_EvalFIP(const std::string &dir_path, const std::string &rel_path, bool skip_safety_check);
#endif