summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Src/FileUtil.cpp
diff options
context:
space:
mode:
authorXTra.KrazzY <XTra.KrazzY@gmail.com>2009-04-25 10:38:26 +0000
committerXTra.KrazzY <XTra.KrazzY@gmail.com>2009-04-25 10:38:26 +0000
commit1045fc7e9890f5678f13d01598e87b8746279adb (patch)
tree6de04a88efeb7f5885665ad42e50f94c86b5a19c /Source/Core/Common/Src/FileUtil.cpp
parent72febe7b8a18eb2d7a6493e3963cecbee7195ea3 (diff)
Completely fixed DSPTool, on all of its memory leaks, bad API and bad C++. (compiling with include works perfectly)
More small leftover fixes git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3071 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common/Src/FileUtil.cpp')
-rw-r--r--Source/Core/Common/Src/FileUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp
index bfc3188a67..3424defd06 100644
--- a/Source/Core/Common/Src/FileUtil.cpp
+++ b/Source/Core/Common/Src/FileUtil.cpp
@@ -620,7 +620,7 @@ bool WriteStringToFile(bool text_file, const std::string &str, const char *filen
return true;
}
-bool ReadFileToString(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)
@@ -630,7 +630,7 @@ bool ReadFileToString(bool text_file, const char *filename, std::string *str)
fseek(f, 0, SEEK_SET);
char *buf = new char[len + 1];
buf[fread(buf, 1, len, f)] = 0;
- *str = std::string(buf, len);
+ str = std::string(buf, len);
fclose(f);
delete [] buf;
return true;