summaryrefslogtreecommitdiff
path: root/src/repoList.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-10-27 12:01:06 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-10-27 14:45:42 +0000
commit97b1aae251a48af7b85eafd76e5284458d42f181 (patch)
tree13e9b00b250f23d30621ce041f7a6955ea5f4dc7 /src/repoList.cpp
parentModernize build (diff)
downloadnetfs-gitfs-97b1aae251a48af7b85eafd76e5284458d42f181.tar.bz2
netfs-gitfs-97b1aae251a48af7b85eafd76e5284458d42f181.tar.xz
netfs-gitfs-97b1aae251a48af7b85eafd76e5284458d42f181.zip
Fixes for tidy
Diffstat (limited to 'src/repoList.cpp')
-rw-r--r--src/repoList.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/repoList.cpp b/src/repoList.cpp
index 9fc2848..4eb76af 100644
--- a/src/repoList.cpp
+++ b/src/repoList.cpp
@@ -5,7 +5,8 @@
#include <compileTimeFormatter.h>
-GitFS::RepoList::RepoList(const Ice::PropertiesPtr & p) : properties(p)
+GitFS::RepoList::RepoList(Ice::PropertiesPtr && p) :
+ properties(std::move(p))
{
}
@@ -15,14 +16,20 @@ NetFS::VolumePrxPtr
GitFS::RepoList::connect(const ::std::string volume, const ::std::string auth,
const ::Ice::Current & ice)
{
- if (volume.empty()) throw NetFS::ConfigError();
+ if (volume.empty()) {
+ 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));
- if (propReader("gitdir").empty()) throw NetFS::ConfigError();
- if (propReader("authkey") != auth) throw NetFS::AuthError();
+ if (propReader("gitdir").empty()) {
+ throw NetFS::ConfigError();
+ }
+ if (propReader("authkey") != auth) {
+ throw NetFS::AuthError();
+ }
return Ice::uncheckedCast<NetFS::VolumePrx>(
ice.adapter->addWithUUID(std::make_shared<Repo>(propReader)));
}