src: Discard usage of std::pair of reference type and rename functions
Refs: #1531
Change-Id: Ief2a525b8fb8addbd491d202d6b02d5db2b41ea4
diff --git a/src/lsa.cpp b/src/lsa.cpp
index 0bd450c..e2b6dcf 100644
--- a/src/lsa.cpp
+++ b/src/lsa.cpp
@@ -18,7 +18,7 @@
string
-NameLsa::getKey()
+NameLsa::getKey() const
{
string key;
key = m_origRouter + "/" + boost::lexical_cast<std::string>(1);
@@ -110,8 +110,9 @@
-CorLsa::CorLsa(string origR, uint8_t lst, uint32_t lsn, uint32_t lt
- , double r, double theta)
+CoordinateLsa::CoordinateLsa(string origR, uint8_t lst, uint32_t lsn,
+ uint32_t lt
+ , double r, double theta)
{
m_origRouter = origR;
m_lsType = lst;
@@ -122,7 +123,7 @@
}
string
-CorLsa::getKey()
+CoordinateLsa::getKey() const
{
string key;
key = m_origRouter + "/" + boost::lexical_cast<std::string>(3);
@@ -130,7 +131,7 @@
}
bool
-CorLsa::isEqual(CorLsa& clsa)
+CoordinateLsa::isEqual(const CoordinateLsa& clsa)
{
return (std::abs(m_corRad - clsa.getCorRadius()) <
std::numeric_limits<double>::epsilon()) &&
@@ -139,7 +140,7 @@
}
string
-CorLsa::getData()
+CoordinateLsa::getData()
{
string corLsaData;
corLsaData = m_origRouter + "|";
@@ -152,7 +153,7 @@
}
bool
-CorLsa::initializeFromContent(string content)
+CoordinateLsa::initializeFromContent(string content)
{
Tokenizer nt(content, "|");
m_origRouter = nt.getNextToken();
@@ -176,7 +177,7 @@
}
std::ostream&
-operator<<(std::ostream& os, CorLsa& cLsa)
+operator<<(std::ostream& os, const CoordinateLsa& cLsa)
{
os << "Cor Lsa: " << endl;
os << " Origination Router: " << cLsa.getOrigRouter() << endl;