Bug 672450 - C4233/C4267 warning for jsobj.h, vm/String.h and jsatom.h. r=luke

This commit is contained in:
Makoto Kato 2011-07-20 14:07:51 +09:00
parent 7abc217fd4
commit 379ca2fc94
3 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ struct DefaultHasher<jsid>
typedef jsid Lookup; typedef jsid Lookup;
static HashNumber hash(const Lookup &l) { static HashNumber hash(const Lookup &l) {
JS_ASSERT(l == js_CheckForStringIndex(l)); JS_ASSERT(l == js_CheckForStringIndex(l));
return JSID_BITS(l); return HashNumber(JSID_BITS(l));
} }
static bool match(const jsid &id, const Lookup &l) { static bool match(const jsid &id, const Lookup &l) {
JS_ASSERT(l == js_CheckForStringIndex(l)); JS_ASSERT(l == js_CheckForStringIndex(l));

View File

@ -594,7 +594,7 @@ struct JSObject : js::gc::Cell {
/* gc::FinalizeKind */ unsigned finalizeKind() const; /* gc::FinalizeKind */ unsigned finalizeKind() const;
uint32 numSlots() const { return capacity; } uint32 numSlots() const { return uint32(capacity); }
size_t slotsAndStructSize(uint32 nslots) const; size_t slotsAndStructSize(uint32 nslots) const;
size_t slotsAndStructSize() const { return slotsAndStructSize(numSlots()); } size_t slotsAndStructSize() const { return slotsAndStructSize(numSlots()); }

View File

@ -583,7 +583,7 @@ class JSExternalString : public JSFixedString
intN externalType() const { intN externalType() const {
JS_ASSERT(isExternal()); JS_ASSERT(isExternal());
JS_ASSERT(d.s.u2.externalType < TYPE_LIMIT); JS_ASSERT(d.s.u2.externalType < TYPE_LIMIT);
return d.s.u2.externalType; return intN(d.s.u2.externalType);
} }
void *externalClosure() const { void *externalClosure() const {