Avoid implicit casts and make code more portable (#716)

This commit is contained in:
tdcosta100
2023-01-23 07:32:53 -03:00
committed by GitHub
parent e47efe3761
commit d5acff3c74
18 changed files with 63 additions and 61 deletions

View File

@@ -39,7 +39,7 @@ public:
Nan::EscapableHandleScope scope;
// const_cast because v8::Local<T>::As is not marked const until node v8.0
v8::Local<v8::Array> array = const_cast<v8::Local<v8::Value>&>(value).As<v8::Array>();
return scope.Escape(Nan::Get(array, i).ToLocalChecked());
return scope.Escape(Nan::Get(array, static_cast<uint32_t>(i)).ToLocalChecked());
}
static bool isObject(const v8::Local<v8::Value>& value) {