Bug 999717 - Fix gcc -Wlogical-op warning in js. r=mrbkap

This commit is contained in:
Chris Peterson 2014-04-22 14:42:27 -07:00
parent 79f8aaa566
commit 166df78b9e

View File

@ -136,14 +136,8 @@ XPCConvert::NativeData2JS(MutableHandleValue d, const void* s,
d.setNumber(*static_cast<const double*>(s));
return true;
case nsXPTType::T_BOOL :
{
bool b = *static_cast<const bool*>(s);
NS_WARN_IF_FALSE(b == 1 || b == 0,
"Passing a malformed bool through XPConnect");
d.setBoolean(b);
d.setBoolean(*static_cast<const bool*>(s));
return true;
}
case nsXPTType::T_CHAR :
{
char p = *static_cast<const char*>(s);