]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[433-update-yang-models] Moved to fabs to near double equal
authorFrancis Dupont <fdupont@isc.org>
Tue, 13 Aug 2019 12:35:45 +0000 (14:35 +0200)
committerTomek Mrugalski <tomek@isc.org>
Tue, 13 Aug 2019 21:43:06 +0000 (17:43 -0400)
src/lib/cc/data.cc

index 0572e0ef777fd650a93967eef74e0711fa3e9c4e..d2e4c9a1c788c1662ba9834f3949d64767b73073 100644 (file)
@@ -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