mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 11:26:09 +00: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
ec00b3a785
commit
b45dcdc221
@ -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