clang-tidy: run readability-redundant-string-cstr

This commit is contained in:
scribam 2021-03-14 19:34:32 +01:00
parent 26ebcdf9f5
commit de363f176f
2 changed files with 3 additions and 3 deletions

View File

@ -62,7 +62,7 @@ static bool loadBios(const char *filename, Archive *child_archive, Archive *pare
std::string arch_name(filename);
std::string path = get_readonly_data_path(arch_name + ".zip");
if (!file_exists(path.c_str()))
if (!file_exists(path))
path = get_readonly_data_path(arch_name + ".7z");
DEBUG_LOG(NAOMI, "Loading BIOS from %s", path.c_str());
std::unique_ptr<Archive> bios_archive(OpenArchive(path.c_str()));

View File

@ -206,7 +206,7 @@ std::shared_ptr<InputMapping> InputMapping::LoadMapping(const char *name)
if (it != loaded_mappings.end())
return it->second;
std::string path = get_readonly_config_path((std::string("mappings/") + name).c_str());
std::string path = get_readonly_config_path(std::string("mappings/") + name);
FILE *fp = nowide::fopen(path.c_str(), "r");
if (fp == NULL)
return NULL;
@ -225,7 +225,7 @@ bool InputMapping::save(const char *name)
std::string path = get_writable_config_path("mappings/");
make_directory(path);
path = get_writable_config_path((std::string("mappings/") + name).c_str());
path = get_writable_config_path(std::string("mappings/") + name);
FILE *fp = nowide::fopen(path.c_str(), "w");
if (fp == NULL)
{