summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2018-10-13 09:57:36 -0700
committerRatan Gupta <ratagupt@linux.vnet.ibm.com>2018-11-21 09:11:52 +0000
commit6d6699600baea9e6bd6e809c4a38ebec0ff2f091 (patch)
treee7a0c76aff35f2649a20757fc292568069f734f8
parent836c91daea698a9ff2dc9a79112a6e29d1d69732 (diff)
downloadphosphor-networkd-6d6699600baea9e6bd6e809c4a38ebec0ff2f091.tar.gz
phosphor-networkd-6d6699600baea9e6bd6e809c4a38ebec0ff2f091.zip
cleanup: add constref to parameters in routing_table
routing_table.hpp: Add const reference to string parameters in constructor. Change-Id: I29a4a7db17706eb48cffcd7e6b0c2d72191e27f8 Signed-off-by: Patrick Venture <venture@google.com>
-rw-r--r--routing_table.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/routing_table.hpp b/routing_table.hpp
index f23b54c..10198d8 100644
--- a/routing_table.hpp
+++ b/routing_table.hpp
@@ -25,8 +25,10 @@ struct Entry
std::string gateway;
// interface for this route
std::string interface;
- Entry(std::string dest, std::string gtw, std::string intf) :
- destination(dest), gateway(gtw), interface(intf)
+ Entry(const std::string& dest, const std::string& gtw,
+ const std::string& intf) :
+ destination(dest),
+ gateway(gtw), interface(intf)
{
}
OpenPOWER on IntegriCloud