Remove unused overloads in Schema

Change-Id: I919c7175401c557a489b6f288f7f5517a77472d9
diff --git a/src/yang_schema.cpp b/src/yang_schema.cpp
index b44ef5f..c8bf540 100644
--- a/src/yang_schema.cpp
+++ b/src/yang_schema.cpp
@@ -93,14 +93,6 @@
     return set.find(name) != set.end();
 }
 
-bool YangSchema::listHasKey(const schemaPath_& location, const ModuleNodePair& node, const std::string& key) const
-{
-    if (!isList(location, node))
-        return false;
-    const auto keys = listKeys(location, node);
-    return keys.find(key) != keys.end();
-}
-
 bool YangSchema::listHasKey(const schemaPath_& listPath, const std::string& key) const
 {
     const auto keys = listKeys(listPath);
@@ -153,30 +145,20 @@
     return impl_getSchemaNode(absPath);
 }
 
-namespace {
-const std::set<std::string> impl_listKeys(const libyang::S_Schema_Node_List& list)
+const std::set<std::string> YangSchema::listKeys(const schemaPath_& listPath) const
 {
+    auto node = getSchemaNode(listPath);
+    if (node->nodetype() != LYS_LIST) {
+        return {};
+    }
+
+    auto list = std::make_shared<libyang::Schema_Node_List>(node);
     std::set<std::string> keys;
     const auto& keysVec = list->keys();
 
     std::transform(keysVec.begin(), keysVec.end(), std::inserter(keys, keys.begin()), [](const auto& it) { return it->name(); });
     return keys;
 }
-}
-
-const std::set<std::string> YangSchema::listKeys(const schemaPath_& location, const ModuleNodePair& node) const
-{
-    if (!isList(location, node))
-        return {};
-    auto list = std::make_shared<libyang::Schema_Node_List>(getSchemaNode(location, node));
-    return impl_listKeys(list);
-}
-
-const std::set<std::string> YangSchema::listKeys(const schemaPath_& listPath) const
-{
-    auto list = std::make_shared<libyang::Schema_Node_List>(getSchemaNode(listPath));
-    return impl_listKeys(list);
-}
 
 namespace {
 std::set<enum_> enumValues(const libyang::S_Type& typeArg)