[core] Fix bugprone-too-small-loop-variable errors

As reported by clang-tidy-8.
This commit is contained in:
Thiago Marcos P. Santos
2020-03-27 18:20:33 +02:00
parent 31338c5d88
commit b4e9c0bd11
7 changed files with 10 additions and 8 deletions

View File

@@ -157,7 +157,7 @@ struct ToValue {
v8::Local<v8::Value> operator()(const std::vector<Value>& array) {
Nan::EscapableHandleScope scope;
v8::Local<v8::Array> result = Nan::New<v8::Array>();
for (unsigned int i = 0; i < array.size(); i++) {
for (std::size_t i = 0; i < array.size(); i++) {
result->Set(i, toJS(array[i]));
}
return scope.Escape(result);

View File

@@ -112,7 +112,7 @@ struct ToValue {
v8::Local<v8::Value> operator()(const std::vector<mbgl::Value>& array) {
Nan::EscapableHandleScope scope;
v8::Local<v8::Array> result = Nan::New<v8::Array>();
for (unsigned int i = 0; i < array.size(); i++) {
for (std::size_t i = 0; i < array.size(); i++) {
result->Set(i, toJS(array[i]));
}
return scope.Escape(result);

View File

@@ -1374,7 +1374,7 @@ void NodeMap::QueryRenderedFeatures(const Nan::FunctionCallbackInfo<v8::Value>&
}
auto array = Nan::New<v8::Array>();
for (unsigned int i = 0; i < optional.size(); i++) {
for (std::size_t i = 0; i < optional.size(); i++) {
array->Set(i, toJS(optional[i]));
}
info.GetReturnValue().Set(array);