summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index 7030c9dc25..75118bffac 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -887,7 +887,7 @@ std::string GetThemeDir(const std::string& theme_name)
return GetSysDirectory() + THEMES_DIR "/" DEFAULT_THEME_DIR "/";
}
-bool WriteStringToFile(const std::string& str, const std::string& filename)
+bool WriteStringToFile(const std::string& filename, std::string_view str)
{
return File::IOFile(filename, "wb").WriteBytes(str.data(), str.size());
}
@@ -900,7 +900,7 @@ bool ReadFileToString(const std::string& filename, std::string& str)
return false;
str.resize(file.GetSize());
- return file.ReadArray(&str[0], str.size());
+ return file.ReadArray(str.data(), str.size());
}
} // namespace File