summaryrefslogtreecommitdiff
path: root/src/idl_gen_js.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/idl_gen_js.cpp')
-rw-r--r--src/idl_gen_js.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/idl_gen_js.cpp b/src/idl_gen_js.cpp
index 04c1f091..8245ddeb 100644
--- a/src/idl_gen_js.cpp
+++ b/src/idl_gen_js.cpp
@@ -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;