No bug - Move the bool specialization of PrimitiveConversionTraits from between the integer ones.

This commit is contained in:
Ms2ger 2012-09-06 09:20:29 +02:00
parent bd32566761
commit 40c67660e9

View File

@ -76,16 +76,6 @@ template<>
struct PrimitiveConversionTraits<uint32_t> : PrimitiveConversionTraits_smallInt {
};
template<>
struct PrimitiveConversionTraits<bool> {
typedef JSBool jstype;
typedef bool intermediateType;
static inline bool converter(JSContext* /* unused */, JS::Value v, jstype* retval) {
*retval = JS::ToBoolean(v);
return true;
}
};
template<>
struct PrimitiveConversionTraits<int64_t> {
typedef int64_t jstype;
@ -104,6 +94,16 @@ struct PrimitiveConversionTraits<uint64_t> {
}
};
template<>
struct PrimitiveConversionTraits<bool> {
typedef JSBool jstype;
typedef bool intermediateType;
static inline bool converter(JSContext* /* unused */, JS::Value v, jstype* retval) {
*retval = JS::ToBoolean(v);
return true;
}
};
struct PrimitiveConversionTraits_float {
typedef double jstype;
typedef double intermediateType;