summaryrefslogtreecommitdiff
path: root/src/common/file_util.h
diff options
context:
space:
mode:
authorGravatar Lioncash2019-05-23 13:52:40 -0400
committerGravatar Lioncash2019-05-23 13:52:43 -0400
commit2b1fcc8a14d93c16ce00e1a9888e3f4f839f18f9 (patch)
tree129596d2ff096166c68af0f39ebf6dda8d7a7ff9 /src/common/file_util.h
parentcommon/file_util: Remove unnecessary c_str() calls (diff)
downloadyuzu-2b1fcc8a14d93c16ce00e1a9888e3f4f839f18f9.tar.gz
yuzu-2b1fcc8a14d93c16ce00e1a9888e3f4f839f18f9.tar.xz
yuzu-2b1fcc8a14d93c16ce00e1a9888e3f4f839f18f9.zip
common/file_util: Make ReadFileToString and WriteStringToFile consistent
Makes the parameter ordering consistent, and also makes the filename parameter a std::string. A std::string would be constructed anyways with the previous code, as IOFile's only constructor with a filepath is one taking a std::string. We can also make WriteStringToFile's string parameter utilize a std::string_view for the string, making use of our previous changes to IOFile.
Diffstat (limited to 'src/common/file_util.h')
-rw-r--r--src/common/file_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/file_util.h b/src/common/file_util.h
index 88760be2f..c325f5b49 100644
--- a/src/common/file_util.h
+++ b/src/common/file_util.h
@@ -146,9 +146,9 @@ const std::string& GetExeDirectory();
146std::string AppDataRoamingDirectory(); 146std::string AppDataRoamingDirectory();
147#endif 147#endif
148 148
149std::size_t WriteStringToFile(bool text_file, const std::string& str, const char* filename); 149std::size_t WriteStringToFile(bool text_file, const std::string& filename, std::string_view str);
150 150
151std::size_t ReadFileToString(bool text_file, const char* filename, std::string& str); 151std::size_t ReadFileToString(bool text_file, const std::string& filename, std::string& str);
152 152
153/** 153/**
154 * Splits the filename into 8.3 format 154 * Splits the filename into 8.3 format