Replace C-style casts

This commit is contained in:
Daniel Pfeifer
2017-08-27 09:58:46 +02:00
parent 2ade9a0264
commit 190e3825d4
33 changed files with 99 additions and 93 deletions
+3 -3
View File
@@ -96,9 +96,9 @@ void cmDependsJavaParserHelper::SafePrintMissing(const char* str, int line,
for (cc = 0; cc < strlen(str); cc++) {
unsigned char ch = str[cc];
if (ch >= 32 && ch <= 126) {
std::cout << (char)ch;
std::cout << static_cast<char>(ch);
} else {
std::cout << "<" << (int)ch << ">";
std::cout << "<" << static_cast<int>(ch) << ">";
break;
}
}
@@ -166,7 +166,7 @@ void cmDependsJavaParserHelper::AllocateParserType(
{
pt->str = nullptr;
if (len == 0) {
len = (int)strlen(str);
len = static_cast<int>(strlen(str));
}
if (len == 0) {
return;