diff options
| author | 2014-09-28 11:30:29 -0400 | |
|---|---|---|
| committer | 2014-09-28 11:44:14 -0400 | |
| commit | ca2f0de08abaffea419e674274113b27acdf6ece (patch) | |
| tree | 30bcdb7a6178ec37b97eac7929b8e92c0e9b0a1b /src/common | |
| parent | Merge pull request #118 from lioncash/chunk-file (diff) | |
| download | yuzu-ca2f0de08abaffea419e674274113b27acdf6ece.tar.gz yuzu-ca2f0de08abaffea419e674274113b27acdf6ece.tar.xz yuzu-ca2f0de08abaffea419e674274113b27acdf6ece.zip | |
Fix warnings in core and common
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/console_listener.cpp | 10 | ||||
| -rw-r--r-- | src/common/file_util.cpp | 4 | ||||
| -rw-r--r-- | src/common/file_util.h | 6 |
3 files changed, 5 insertions, 15 deletions
diff --git a/src/common/console_listener.cpp b/src/common/console_listener.cpp index 40122224c..53f20d754 100644 --- a/src/common/console_listener.cpp +++ b/src/common/console_listener.cpp | |||
| @@ -241,16 +241,6 @@ void ConsoleListener::PixelSpace(int Left, int Top, int Width, int Height, bool | |||
| 241 | void ConsoleListener::Log(LogTypes::LOG_LEVELS Level, const char *Text) | 241 | void ConsoleListener::Log(LogTypes::LOG_LEVELS Level, const char *Text) |
| 242 | { | 242 | { |
| 243 | #if defined(_WIN32) | 243 | #if defined(_WIN32) |
| 244 | /* | ||
| 245 | const int MAX_BYTES = 1024*10; | ||
| 246 | char Str[MAX_BYTES]; | ||
| 247 | va_list ArgPtr; | ||
| 248 | int Cnt; | ||
| 249 | va_start(ArgPtr, Text); | ||
| 250 | Cnt = vsnprintf(Str, MAX_BYTES, Text, ArgPtr); | ||
| 251 | va_end(ArgPtr); | ||
| 252 | */ | ||
| 253 | DWORD cCharsWritten; | ||
| 254 | WORD Color; | 244 | WORD Color; |
| 255 | 245 | ||
| 256 | switch (Level) | 246 | switch (Level) |
diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 40cd32d96..9292a1cd6 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp | |||
| @@ -763,12 +763,12 @@ const std::string& GetUserPath(const unsigned int DirIDX, const std::string &new | |||
| 763 | // return dir; | 763 | // return dir; |
| 764 | //} | 764 | //} |
| 765 | 765 | ||
| 766 | bool WriteStringToFile(bool text_file, const std::string &str, const char *filename) | 766 | size_t WriteStringToFile(bool text_file, const std::string &str, const char *filename) |
| 767 | { | 767 | { |
| 768 | return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size()); | 768 | return FileUtil::IOFile(filename, text_file ? "w" : "wb").WriteBytes(str.data(), str.size()); |
| 769 | } | 769 | } |
| 770 | 770 | ||
| 771 | bool ReadFileToString(bool text_file, const char *filename, std::string &str) | 771 | size_t ReadFileToString(bool text_file, const char *filename, std::string &str) |
| 772 | { | 772 | { |
| 773 | FileUtil::IOFile file(filename, text_file ? "r" : "rb"); | 773 | FileUtil::IOFile file(filename, text_file ? "r" : "rb"); |
| 774 | auto const f = file.GetHandle(); | 774 | auto const f = file.GetHandle(); |
diff --git a/src/common/file_util.h b/src/common/file_util.h index cddcd1951..f9d91972f 100644 --- a/src/common/file_util.h +++ b/src/common/file_util.h | |||
| @@ -6,9 +6,9 @@ | |||
| 6 | 6 | ||
| 7 | #include <fstream> | 7 | #include <fstream> |
| 8 | #include <cstdio> | 8 | #include <cstdio> |
| 9 | #include <cstring> | ||
| 9 | #include <string> | 10 | #include <string> |
| 10 | #include <vector> | 11 | #include <vector> |
| 11 | #include <string.h> | ||
| 12 | 12 | ||
| 13 | #include "common/common.h" | 13 | #include "common/common.h" |
| 14 | #include "common/string_util.h" | 14 | #include "common/string_util.h" |
| @@ -128,8 +128,8 @@ std::string GetBundleDirectory(); | |||
| 128 | std::string &GetExeDirectory(); | 128 | std::string &GetExeDirectory(); |
| 129 | #endif | 129 | #endif |
| 130 | 130 | ||
| 131 | bool WriteStringToFile(bool text_file, const std::string &str, const char *filename); | 131 | size_t WriteStringToFile(bool text_file, const std::string &str, const char *filename); |
| 132 | bool ReadFileToString(bool text_file, const char *filename, std::string &str); | 132 | size_t ReadFileToString(bool text_file, const char *filename, std::string &str); |
| 133 | 133 | ||
| 134 | // simple wrapper for cstdlib file functions to | 134 | // simple wrapper for cstdlib file functions to |
| 135 | // hopefully will make error checking easier | 135 | // hopefully will make error checking easier |