IopBios: Fix function parameter should be passed by const reference warnings.

Codacy.
This commit is contained in:
lightningterror 2024-05-08 13:40:55 +02:00
parent 43fb79d669
commit f0c331e32b
1 changed files with 3 additions and 3 deletions

View File

@ -152,14 +152,14 @@ namespace R3000A
// This is a workaround for GHS on *NIX platforms // This is a workaround for GHS on *NIX platforms
// Whenever a program splits directories with a backslash (ulaunchelf) // Whenever a program splits directories with a backslash (ulaunchelf)
// the directory is considered non-existant // the directory is considered non-existant
static __fi std::string clean_path(const std::string path) static __fi std::string clean_path(const std::string& path)
{ {
std::string ret = path; std::string ret = path;
std::replace(ret.begin(), ret.end(), '\\', '/'); std::replace(ret.begin(), ret.end(), '\\', '/');
return ret; return ret;
} }
static int host_stat(const std::string path, fio_stat_t* host_stats, fio_stat_flags& stat = ioman_stat) static int host_stat(const std::string& path, fio_stat_t* host_stats, fio_stat_flags& stat = ioman_stat)
{ {
struct stat file_stats; struct stat file_stats;
const std::string file_path(ioman::host_path(path, true)); const std::string file_path(ioman::host_path(path, true));
@ -218,7 +218,7 @@ namespace R3000A
return 0; return 0;
} }
static int host_stat(const std::string path, fxio_stat_t* host_stats) static int host_stat(const std::string& path, fxio_stat_t* host_stats)
{ {
return host_stat(path, &host_stats->_fioStat, iomanx_stat); return host_stat(path, &host_stats->_fioStat, iomanx_stat);
} }