diff options
author | James Rowe <jroweboy@gmail.com> | 2018-07-02 18:20:50 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-07-03 03:45:47 +0200 |
commit | 0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b (patch) | |
tree | aba03bf491181cf741420dd1445bd5399e48a3af /src/common | |
parent | Rename logging macro back to LOG_* (diff) | |
download | yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.tar yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.tar.gz yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.tar.bz2 yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.tar.lz yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.tar.xz yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.tar.zst yuzu-0d46f0df122dbc9b9a9d9f97e2da6b1953ef939b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/assert.h | 5 | ||||
-rw-r--r-- | src/common/file_util.cpp | 18 | ||||
-rw-r--r-- | src/common/logging/filter.cpp | 2 |
3 files changed, 11 insertions, 14 deletions
diff --git a/src/common/assert.h b/src/common/assert.h index fbe87273b..655446f34 100644 --- a/src/common/assert.h +++ b/src/common/assert.h @@ -30,15 +30,14 @@ __declspec(noinline, noreturn) #define ASSERT(_a_) \ do \ if (!(_a_)) { \ - assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \ + assert_noinline_call([] { LOG_CRITICAL(Debug, "Assertion Failed!"); }); \ } \ while (0) #define ASSERT_MSG(_a_, ...) \ do \ if (!(_a_)) { \ - assert_noinline_call( \ - [&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \ + assert_noinline_call([&] { LOG_CRITICAL(Debug, "Assertion Failed!\n" __VA_ARGS__); }); \ } \ while (0) diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index 40b633092..2152e3fea 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -257,7 +257,7 @@ bool Rename(const std::string& srcFilename, const std::string& destFilename) { return true; #endif LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename, - GetLastErrorMsg()); + GetLastErrorMsg()); return false; } @@ -270,7 +270,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { return true; LOG_ERROR(Common_Filesystem, "failed {} --> {}: {}", srcFilename, destFilename, - GetLastErrorMsg()); + GetLastErrorMsg()); return false; #else @@ -283,7 +283,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { FILE* input = fopen(srcFilename.c_str(), "rb"); if (!input) { LOG_ERROR(Common_Filesystem, "opening input failed {} --> {}: {}", srcFilename, - destFilename, GetLastErrorMsg()); + destFilename, GetLastErrorMsg()); return false; } @@ -292,7 +292,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { if (!output) { fclose(input); LOG_ERROR(Common_Filesystem, "opening output failed {} --> {}: {}", srcFilename, - destFilename, GetLastErrorMsg()); + destFilename, GetLastErrorMsg()); return false; } @@ -303,7 +303,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { if (rnum != BSIZE) { if (ferror(input) != 0) { LOG_ERROR(Common_Filesystem, "failed reading from source, {} --> {}: {}", - srcFilename, destFilename, GetLastErrorMsg()); + srcFilename, destFilename, GetLastErrorMsg()); goto bail; } } @@ -312,7 +312,7 @@ bool Copy(const std::string& srcFilename, const std::string& destFilename) { size_t wnum = fwrite(buffer, sizeof(char), rnum, output); if (wnum != rnum) { LOG_ERROR(Common_Filesystem, "failed writing to output, {} --> {}: {}", srcFilename, - destFilename, GetLastErrorMsg()); + destFilename, GetLastErrorMsg()); goto bail; } } @@ -371,14 +371,12 @@ u64 GetSize(FILE* f) { // can't use off_t here because it can be 32-bit u64 pos = ftello(f); if (fseeko(f, 0, SEEK_END) != 0) { - LOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), - GetLastErrorMsg()); + LOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), GetLastErrorMsg()); return 0; } u64 size = ftello(f); if ((size != pos) && (fseeko(f, pos, SEEK_SET) != 0)) { - LOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), - GetLastErrorMsg()); + LOG_ERROR(Common_Filesystem, "GetSize: seek failed {}: {}", fmt::ptr(f), GetLastErrorMsg()); return 0; } return size; diff --git a/src/common/logging/filter.cpp b/src/common/logging/filter.cpp index fdfb66696..733247b51 100644 --- a/src/common/logging/filter.cpp +++ b/src/common/logging/filter.cpp @@ -66,7 +66,7 @@ bool Filter::ParseFilterRule(const std::string::const_iterator begin, auto level_separator = std::find(begin, end, ':'); if (level_separator == end) { LOG_ERROR(Log, "Invalid log filter. Must specify a log level after `:`: %s", - std::string(begin, end).c_str()); + std::string(begin, end).c_str()); return false; } |