From: Francis Dupont Date: Tue, 13 Aug 2019 12:35:45 +0000 (+0200) Subject: [433-update-yang-models] Moved to fabs to near double equal X-Git-Tag: Kea-1.6.0~41^2~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ff8d3db8bb4635a03156f4895e957a458cb38bd;p=thirdparty%2Fkea.git [433-update-yang-models] Moved to fabs to near double equal --- diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc index 0572e0ef77..d2e4c9a1c7 100644 --- a/src/lib/cc/data.cc +++ b/src/lib/cc/data.cc @@ -978,7 +978,7 @@ IntElement::equals(const Element& other) const { bool DoubleElement::equals(const Element& other) const { return (other.getType() == Element::real) && - (str() == other.str()); + (fabs(d - other.doubleValue()) < 1e-14); } bool