disallow c style casts (#4981)

Fixes #4857.
This commit is contained in:
Frank Benkstein
2018-10-16 00:11:31 +02:00
committed by Wouter van Oortmerssen
parent a3d8391f7b
commit 20396a1760
12 changed files with 37 additions and 28 deletions

View File

@@ -459,8 +459,9 @@ class JsGenerator : public BaseGenerator {
case BASE_TYPE_LONG:
case BASE_TYPE_ULONG: {
int64_t constant = StringToInt(value.constant.c_str());
return context + ".createLong(" + NumToString((int32_t)constant) +
", " + NumToString((int32_t)(constant >> 32)) + ")";
return context + ".createLong(" +
NumToString(static_cast<int32_t>(constant)) + ", " +
NumToString(static_cast<int32_t>(constant >> 32)) + ")";
}
default: return value.constant;