Fix another -0 check
Change-Id: I6146e4c41aa08ff4804fa2f37e93186ddc0a2a0f Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
parent
1d7f082f33
commit
c173394036
|
@ -236,9 +236,9 @@ bool Value::sameValue(Value other) const {
|
|||
if (s && os)
|
||||
return s->isEqualTo(os);
|
||||
if (isInteger() && other.isDouble())
|
||||
return int_32() ? (double(int_32()) == other.doubleValue()) : (other._val == 0);
|
||||
return int_32() ? (double(int_32()) == other.doubleValue()) : !std::signbit(other.doubleValue());
|
||||
if (isDouble() && other.isInteger())
|
||||
return other.int_32() ? (doubleValue() == double(other.int_32())) : (_val == 0);
|
||||
return other.int_32() ? (doubleValue() == double(other.int_32())) : !std::signbit(doubleValue());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue