diff options
| author | 2020-10-30 15:02:02 -0400 | |
|---|---|---|
| committer | 2020-11-02 15:50:58 -0500 | |
| commit | 4a4b685a0420b0ac7c026cd2370c23d54f469976 (patch) | |
| tree | 8de9e9a72563a369dac5ec8183e417e40ee4b8bf /src/common/string_util.cpp | |
| parent | CMakeLists: Resolve MSVC build failures (diff) | |
| download | yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.gz yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.tar.xz yuzu-4a4b685a0420b0ac7c026cd2370c23d54f469976.zip | |
common: Enable warnings as errors
Cleans up common so that we can enable warnings as errors.
Diffstat (limited to 'src/common/string_util.cpp')
| -rw-r--r-- | src/common/string_util.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 84883a1d3..4cba2aaa4 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp | |||
| @@ -8,6 +8,7 @@ | |||
| 8 | #include <cstdlib> | 8 | #include <cstdlib> |
| 9 | #include <locale> | 9 | #include <locale> |
| 10 | #include <sstream> | 10 | #include <sstream> |
| 11 | |||
| 11 | #include "common/common_paths.h" | 12 | #include "common/common_paths.h" |
| 12 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 13 | #include "common/string_util.h" | 14 | #include "common/string_util.h" |
| @@ -21,14 +22,14 @@ namespace Common { | |||
| 21 | /// Make a string lowercase | 22 | /// Make a string lowercase |
| 22 | std::string ToLower(std::string str) { | 23 | std::string ToLower(std::string str) { |
| 23 | std::transform(str.begin(), str.end(), str.begin(), | 24 | std::transform(str.begin(), str.end(), str.begin(), |
| 24 | [](unsigned char c) { return std::tolower(c); }); | 25 | [](unsigned char c) { return static_cast<char>(std::tolower(c)); }); |
| 25 | return str; | 26 | return str; |
| 26 | } | 27 | } |
| 27 | 28 | ||
| 28 | /// Make a string uppercase | 29 | /// Make a string uppercase |
| 29 | std::string ToUpper(std::string str) { | 30 | std::string ToUpper(std::string str) { |
| 30 | std::transform(str.begin(), str.end(), str.begin(), | 31 | std::transform(str.begin(), str.end(), str.begin(), |
| 31 | [](unsigned char c) { return std::toupper(c); }); | 32 | [](unsigned char c) { return static_cast<char>(std::toupper(c)); }); |
| 32 | return str; | 33 | return str; |
| 33 | } | 34 | } |
| 34 | 35 | ||