summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/FileUtil.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2009-04-12 13:12:42 +0000
committerhrydgard <hrydgard@gmail.com>2009-04-12 13:12:42 +0000
commitf6474b98a85877aae2b7c0c8485e280bbf68053a (patch)
treeb5df7c6318644b9a3518ce0a48212c35ca774460 /Source/Core/Common/Src/FileUtil.cpp
parente8b9e93465ec9e78de823c1480439f9efb2a8012 (diff)
DSP assembler: Error message improvements.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2956 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index 05030deb59..8a16ae01dd 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -601,13 +601,13 @@ const char *GetUserDirectory()
return path;
}
-bool WriteStringToFile(bool text_file, const char *str, const char *filename)
+bool WriteStringToFile(bool text_file, const std::string &str, const char *filename)
{
FILE *f = fopen(filename, text_file ? "w" : "wb");
if (!f)
return false;
- size_t len = strlen(str);
- if (len != fwrite(str, 1, strlen(str), f))
+ size_t len = str.size();
+ if (len != fwrite(str.data(), 1, str.size(), f))
{
fclose(f);
return false;
@@ -616,7 +616,7 @@ bool WriteStringToFile(bool text_file, const char *str, const char *filename)
return true;
}
-bool ReadStringFromFile(bool text_file, const char *filename, std::string *str)
+bool ReadFileToString(bool text_file, const char *filename, std::string *str)
{
FILE *f = fopen(filename, text_file ? "r" : "rb");
if (!f)