diff --git a/src/build_info.cpp b/src/build_info.cpp index 229ecf58bbce..009c07424d7b 100644 --- a/src/build_info.cpp +++ b/src/build_info.cpp @@ -76,7 +76,7 @@ std::string format_version(const SDL_version& v) std::string format_openssl_patch_level(uint8_t p) { return p <= 26 - ? std::string(1, 'a' + char(p) - 1) + ? std::string(1, 'a' + static_cast(p) - 1) : "patch" + std::to_string(p); } diff --git a/src/config.cpp b/src/config.cpp index a95aa11f43e5..4e9948947d33 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -1247,7 +1247,7 @@ std::ostream& operator<<(std::ostream& outstream, const config& cfg) } for(int j = 0; j < i - 1; j++) { - outstream << char(9); + outstream << static_cast(9); } outstream << val.first << " = " << val.second << '\n'; @@ -1255,14 +1255,14 @@ std::ostream& operator<<(std::ostream& outstream, const config& cfg) for(const config::any_child& child : cfg.all_children_range()) { for(int j = 0; j < i - 1; ++j) { - outstream << char(9); + outstream << static_cast(9); } outstream << "[" << child.key << "]\n"; outstream << child.cfg; for(int j = 0; j < i - 1; ++j) { - outstream << char(9); + outstream << static_cast(9); } outstream << "[/" << child.key << "]\n"; diff --git a/src/tstring.cpp b/src/tstring.cpp index 7e0279980699..d4c00e6deb96 100644 --- a/src/tstring.cpp +++ b/src/tstring.cpp @@ -275,8 +275,8 @@ t_string_base::t_string_base(const std::string& string, const std::string& textd id = idi->second; } - value_ += char(id & 0xff); - value_ += char(id >> 8); + value_ += static_cast(id & 0xff); + value_ += static_cast(id >> 8); value_ += string; } @@ -304,8 +304,8 @@ t_string_base::t_string_base(const std::string& sing, const std::string& pl, int id = idi->second; } - value_ += char(id & 0xff); - value_ += char(id >> 8); + value_ += static_cast(id & 0xff); + value_ += static_cast(id >> 8); value_ += sing; value_ += PLURAL_PART;