@@ -67,7 +67,7 @@ std::vector<size_t> js_to_cpp<std::vector<size_t>>(const Napi::CallbackInfo& inf
67
67
68
68
std::vector<size_t > nativeArray;
69
69
70
- for (size_t i = 0 ; i < arrayLength; ++i) {
70
+ for (uint32_t i = 0 ; i < arrayLength; ++i) {
71
71
Napi::Value arrayItem = array[i];
72
72
if (!arrayItem.IsNumber ()) {
73
73
OPENVINO_THROW (std::string (" Passed array must contain only numbers." ));
@@ -107,7 +107,7 @@ std::unordered_set<std::string> js_to_cpp<std::unordered_set<std::string>>(
107
107
108
108
std::unordered_set<std::string> nativeArray;
109
109
110
- for (size_t i = 0 ; i < arrayLength; ++i) {
110
+ for (uint32_t i = 0 ; i < arrayLength; ++i) {
111
111
Napi::Value arrayItem = array[i];
112
112
if (!arrayItem.IsString ()) {
113
113
OPENVINO_THROW (std::string (" Passed array must contain only strings." ));
@@ -199,7 +199,7 @@ std::map<std::string, ov::Any> js_to_cpp<std::map<std::string, ov::Any>>(
199
199
const auto & config = elem.ToObject ();
200
200
const auto & keys = config.GetPropertyNames ();
201
201
202
- for (size_t i = 0 ; i < keys.Length (); ++i) {
202
+ for (uint32_t i = 0 ; i < keys.Length (); ++i) {
203
203
const std::string& option = static_cast <Napi::Value>(keys[i]).ToString ();
204
204
properties_to_cpp[option] = js_to_cpp<ov::Any>(config.Get (option), {napi_string});
205
205
}
@@ -216,7 +216,7 @@ Napi::String cpp_to_js<ov::element::Type_t, Napi::String>(const Napi::CallbackIn
216
216
template <>
217
217
Napi::Array cpp_to_js<ov::Shape, Napi::Array>(const Napi::CallbackInfo& info, const ov::Shape shape) {
218
218
auto arr = Napi::Array::New (info.Env (), shape.size ());
219
- for (size_t i = 0 ; i < shape.size (); ++i)
219
+ for (uint32_t i = 0 ; i < shape.size (); ++i)
220
220
arr[i] = shape[i];
221
221
return arr;
222
222
}
@@ -226,7 +226,7 @@ Napi::Array cpp_to_js<ov::PartialShape, Napi::Array>(const Napi::CallbackInfo& i
226
226
size_t size = shape.size ();
227
227
Napi::Array dimensions = Napi::Array::New (info.Env (), size);
228
228
229
- for (size_t i = 0 ; i < size; i++) {
229
+ for (uint32_t i = 0 ; i < size; i++) {
230
230
ov::Dimension dim = shape[i];
231
231
232
232
if (dim.is_static ()) {
@@ -254,7 +254,7 @@ Napi::Array cpp_to_js<ov::Dimension, Napi::Array>(const Napi::CallbackInfo& info
254
254
255
255
// Indexes looks wierd, but clear assignment,
256
256
// like: interval[0] = value doesn't work here
257
- size_t indexes[] = {0 , 1 };
257
+ uint32_t indexes[] = {0 , 1 };
258
258
interval[indexes[0 ]] = dim.get_min_length ();
259
259
interval[indexes[1 ]] = dim.get_max_length ();
260
260
@@ -270,13 +270,13 @@ ov::TensorVector parse_input_data(const Napi::Value& input) {
270
270
ov::TensorVector parsed_input;
271
271
if (input.IsArray ()) {
272
272
auto inputs = input.As <Napi::Array>();
273
- for (size_t i = 0 ; i < inputs.Length (); ++i) {
273
+ for (uint32_t i = 0 ; i < inputs.Length (); ++i) {
274
274
parsed_input.emplace_back (cast_to_tensor (static_cast <Napi::Value>(inputs[i])));
275
275
}
276
276
} else if (input.IsObject ()) {
277
277
auto inputs = input.ToObject ();
278
278
const auto & keys = inputs.GetPropertyNames ();
279
- for (size_t i = 0 ; i < keys.Length (); ++i) {
279
+ for (uint32_t i = 0 ; i < keys.Length (); ++i) {
280
280
auto value = inputs.Get (static_cast <Napi::Value>(keys[i]).ToString ().Utf8Value ());
281
281
parsed_input.emplace_back (cast_to_tensor (static_cast <Napi::Value>(value)));
282
282
}
0 commit comments