modify double type euqal compare in json_document.cc

This commit is contained in:
Wei Wei 2015-02-11 10:19:52 +08:00
parent d1cafc0892
commit 513ad866b2
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ bool JSONDocument::operator==(const JSONDocument& rhs) const {
case kBool:
return data_.b == rhs.data_.b;
case kDouble:
return data_.d == rhs.data_.d;
return std::fabs(data_.d - rhs.data_.d) <= std::numeric_limits<double>::epsilon();
case kInt64:
return data_.i == rhs.data_.i;
case kObject: