diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-12-30 18:28:13 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-12-30 18:28:13 +0000 |
commit | 214e179cd285498ebec8148d95ebaa77c96f70d7 (patch) | |
tree | a56b6770422c982aa0a4f4c03633140062340474 /src | |
parent | Disable named parameter check (diff) | |
download | netfs-gitfs-214e179cd285498ebec8148d95ebaa77c96f70d7.tar.bz2 netfs-gitfs-214e179cd285498ebec8148d95ebaa77c96f70d7.tar.xz netfs-gitfs-214e179cd285498ebec8148d95ebaa77c96f70d7.zip |
Simplify property reader
Replaces double bind call with lambda
Diffstat (limited to 'src')
-rw-r--r-- | src/repoList.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |