common: Enable warnings as errors
Cleans up common so that we can enable warnings as errors.
This commit is contained in:
parent
b712b3684a
commit
38ffaef6eb
10 changed files with 57 additions and 37 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue