From 214e179cd285498ebec8148d95ebaa77c96f70d7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 30 Dec 2020 18:28:13 +0000 Subject: Simplify property reader Replaces double bind call with lambda --- src/repoList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/repoList.cpp b/src/repoList.cpp index e3dbb0c..f66e019 100644 --- a/src/repoList.cpp +++ b/src/repoList.cpp @@ -16,9 +16,9 @@ GitFS::RepoList::connect(const ::std::string volume, const ::std::string auth, c throw NetFS::ConfigError(); } - const auto propReader = std::bind(&Ice::Properties::getProperty, properties, - std::bind((std::string(*)(const std::string_view &, const std::string_view &))(&RepoPropertyName::get), - volume, std::placeholders::_1)); + const auto propReader = [volume, this](auto n) { + return properties->getProperty(RepoPropertyName::get(volume, n)); + }; if (propReader("gitdir").empty()) { throw NetFS::ConfigError(); -- cgit v1.2.3