summaryrefslogtreecommitdiffstats
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/file_util.cpp')
-rw-r--r--src/common/file_util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp
index aecb66c32..8a902dd68 100644
--- a/src/common/file_util.cpp
+++ b/src/common/file_util.cpp
@@ -762,11 +762,11 @@ std::string GetNANDRegistrationDir(bool system) {
return GetUserPath(UserPath::NANDDir) + "user/Contents/registered/";
}
-std::size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename) {
- return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size());
+std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str) {
+ return IOFile(filename, text_file ? "w" : "wb").WriteString(str);
}
-std::size_t ReadFileToString(bool text_file, const char* filename, std::string& str) {
+std::size_t ReadFileToString(bool text_file, const std::string& filename, std::string& str) {
IOFile file(filename, text_file ? "r" : "rb");
if (!file.IsOpen())