style: made container APIs more consistent.

Change-Id: Ib4feedfc4c9fb497dfcd67e7e6a33ee03db58d7f
refs: #4337
diff --git a/src/route/nexthop-list.cpp b/src/route/nexthop-list.cpp
index 903ca48..65f6782 100644
--- a/src/route/nexthop-list.cpp
+++ b/src/route/nexthop-list.cpp
@@ -44,7 +44,7 @@
 bool
 operator==(const NexthopList& lhs, const NexthopList& rhs)
 {
-  if (lhs.getSize() != rhs.getSize()) {
+  if (lhs.size() != rhs.size()) {
     return false;
   }