Fixing Coding Style
diff --git a/src/nlsr_adjacent.cpp b/src/nlsr_adjacent.cpp
index f636e5c..6ef9c0b 100644
--- a/src/nlsr_adjacent.cpp
+++ b/src/nlsr_adjacent.cpp
@@ -2,8 +2,10 @@
#include<string>
#include<cmath>
#include<limits>
-
#include "nlsr_adjacent.hpp"
+#include "utility/nlsr_logger.hpp"
+
+#define THIS_FILE "nlsr_adjacent.cpp"
namespace nlsr
{
@@ -12,26 +14,26 @@
Adjacent::Adjacent(const string& an, int cf, double lc, int s, int iton)
{
- adjacentName=an;
- connectingFace=cf;
- linkCost=lc;
- status=s;
- interestTimedOutNo=iton;
+ m_name=an;
+ m_connectingFace=cf;
+ m_linkCost=lc;
+ m_status=s;
+ m_interestTimedOutNo=iton;
}
bool
- Adjacent::isAdjacentEqual(Adjacent& adj)
+ Adjacent::isEqual(Adjacent& adj)
{
- return ( adjacentName == adj.getAdjacentName() ) &&
- ( connectingFace == adj.getConnectingFace() ) &&
- (std::abs(linkCost - adj.getLinkCost()) <
+ return ( m_name == adj.getName() ) &&
+ ( m_connectingFace == adj.getConnectingFace() ) &&
+ (std::abs(m_linkCost - adj.getLinkCost()) <
std::numeric_limits<double>::epsilon()) ;
}
std::ostream&
operator << (std::ostream &os, Adjacent &adj)
{
- cout<<"Adjacent : "<< adj.getAdjacentName() << endl;
+ cout<<"Adjacent : "<< adj.getName() << endl;
cout<<"Connecting Face: "<<adj.getConnectingFace()<<endl;
cout<<"Link Cost: "<<adj.getLinkCost()<<endl;
cout<<"Status: "<<adj.getStatus()<<endl;