Convert a few remaining C-style casts (for char) too static_cast
This commit is contained in:
parent
cb43d8b35f
commit
b07afc2a97
3 changed files with 8 additions and 8 deletions
|
@ -75,7 +75,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<char>(p) - 1)
|
||||
: "patch" + std::to_string(p);
|
||||
}
|
||||
|
||||
|
|
|
@ -1234,7 +1234,7 @@ std::ostream& operator<<(std::ostream& outstream, const config& cfg)
|
|||
}
|
||||
|
||||
for(int j = 0; j < i - 1; j++) {
|
||||
outstream << char(9);
|
||||
outstream << static_cast<char>(9);
|
||||
}
|
||||
|
||||
outstream << val.first << " = " << val.second << '\n';
|
||||
|
@ -1242,14 +1242,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<char>(9);
|
||||
}
|
||||
|
||||
outstream << "[" << child.key << "]\n";
|
||||
outstream << child.cfg;
|
||||
|
||||
for(int j = 0; j < i - 1; ++j) {
|
||||
outstream << char(9);
|
||||
outstream << static_cast<char>(9);
|
||||
}
|
||||
|
||||
outstream << "[/" << child.key << "]\n";
|
||||
|
|
|
@ -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<char>(id & 0xff);
|
||||
value_ += static_cast<char>(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<char>(id & 0xff);
|
||||
value_ += static_cast<char>(id >> 8);
|
||||
value_ += sing;
|
||||
value_ += PLURAL_PART;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue