mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 722215 - dist\include\jsapi.h(3526) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data. r=luke
This commit is contained in:
parent
72ac06e54c
commit
1fa8bbcc1d
@ -2099,9 +2099,9 @@ JS_IdArrayLength(JSContext *cx, JSIdArray *ida)
|
||||
}
|
||||
|
||||
JS_PUBLIC_API(jsid)
|
||||
JS_IdArrayGet(JSContext *cx, JSIdArray *ida, int index)
|
||||
JS_IdArrayGet(JSContext *cx, JSIdArray *ida, unsigned index)
|
||||
{
|
||||
JS_ASSERT(index >= 0 && index < ida->length);
|
||||
JS_ASSERT(index < unsigned(ida->length));
|
||||
return ida->vector[index];
|
||||
}
|
||||
|
||||
|
@ -2215,7 +2215,7 @@ extern JS_PUBLIC_API(int)
|
||||
JS_IdArrayLength(JSContext *cx, JSIdArray *ida);
|
||||
|
||||
extern JS_PUBLIC_API(jsid)
|
||||
JS_IdArrayGet(JSContext *cx, JSIdArray *ida, int index);
|
||||
JS_IdArrayGet(JSContext *cx, JSIdArray *ida, unsigned index);
|
||||
|
||||
extern JS_PUBLIC_API(void)
|
||||
JS_DestroyIdArray(JSContext *cx, JSIdArray *ida);
|
||||
@ -2240,7 +2240,7 @@ class AutoIdArray : private AutoGCRooter
|
||||
}
|
||||
jsid operator[](size_t i) const {
|
||||
JS_ASSERT(idArray);
|
||||
return JS_IdArrayGet(context, idArray, i);
|
||||
return JS_IdArrayGet(context, idArray, unsigned(i));
|
||||
}
|
||||
size_t length() const {
|
||||
return JS_IdArrayLength(context, idArray);
|
||||
|
Loading…
Reference in New Issue
Block a user