From 97b1aae251a48af7b85eafd76e5284458d42f181 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 27 Oct 2019 12:01:06 +0000 Subject: Fixes for tidy --- src/dir.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/dir.cpp') diff --git a/src/dir.cpp b/src/dir.cpp index f59dd92..78ff83a 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -3,9 +3,9 @@ #include "repo.h" #include "dir.h" -GitFS::Directory::Directory(Repo * const r, const std::string & p) : +GitFS::Directory::Directory(Repo * const r, std::string && p) : repo(r), - path(p), + path(std::move(p)), subTreeCacheRootId({}) { getSubtree(); @@ -21,7 +21,9 @@ GitFS::Directory::getSubtree() const } else { auto e = Git::TreeEntryByPath(repo->tree, path); - if (!S_ISDIR(git_tree_entry_filemode(e.get()))) throw NetFS::SystemError(ENOTDIR); + if (!S_ISDIR(git_tree_entry_filemode(e.get()))) { + throw NetFS::SystemError(ENOTDIR); + } subTreeCache = Git::TreeLookup(repo->repo, *git_tree_entry_id(e.get())); } subTreeCacheRootId = *git_tree_id(repo->tree.get()); -- cgit v1.2.3