lsa: define CoordinateLsa operator==
getCorRadius, setCorRadius, getCorTheta, setCorTheta methods are
renamed, in accordance with ndn-cxx code style recommendations.
refs #4094
Change-Id: Iaf3ebf3b895d6dc351b2f754e4a9c65713bdca3a
diff --git a/src/adjacent.cpp b/src/adjacent.cpp
index 508832a..fe8635e 100644
--- a/src/adjacent.cpp
+++ b/src/adjacent.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, The University of Memphis,
+ * Copyright (c) 2014-2024, The University of Memphis,
* Regents of the University of California
*
* This file is part of NLSR (Named-data Link State Routing).
@@ -21,6 +21,7 @@
#include "adjacent.hpp"
#include "logger.hpp"
#include "tlv-nlsr.hpp"
+#include "utility/numeric.hpp"
namespace nlsr {
@@ -158,10 +159,9 @@
bool
Adjacent::operator==(const Adjacent& adjacent) const
{
- return (m_name == adjacent.getName()) &&
- (m_faceUri == adjacent.getFaceUri()) &&
- (std::abs(m_linkCost - adjacent.getLinkCost()) <
- std::numeric_limits<double>::epsilon());
+ return m_name == adjacent.getName() &&
+ m_faceUri == adjacent.getFaceUri() &&
+ util::diffInEpsilon(m_linkCost, adjacent.getLinkCost());
}
bool