diff options
author | bunnei <bunneidev@gmail.com> | 2020-11-03 11:00:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-03 11:00:23 -0800 |
commit | 222fe75401f0672de78c07ba901e650ccc8aa96a (patch) | |
tree | b3f29608f58df5bc86c502171a5f66e2692ec3d8 /src/common/string_util.cpp | |
parent | 448e4d5c2a84fcb438fbd85599553daa80228d78 (diff) | |
parent | 4a4b685a0420b0ac7c026cd2370c23d54f469976 (diff) |
Merge pull request #4873 from lioncash/common-error
common: 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 84883a1d30..4cba2aaa4e 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -8,6 +8,7 @@ #include <cstdlib> #include <locale> #include <sstream> + #include "common/common_paths.h" #include "common/logging/log.h" #include "common/string_util.h" @@ -21,14 +22,14 @@ namespace Common { /// Make a string lowercase std::string ToLower(std::string str) { std::transform(str.begin(), str.end(), str.begin(), - [](unsigned char c) { return std::tolower(c); }); + [](unsigned char c) { return static_cast<char>(std::tolower(c)); }); return str; } /// Make a string uppercase std::string ToUpper(std::string str) { std::transform(str.begin(), str.end(), str.begin(), - [](unsigned char c) { return std::toupper(c); }); + [](unsigned char c) { return static_cast<char>(std::toupper(c)); }); return str; } |