diff options
author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2022-02-15 17:34:51 +0000 |
---|---|---|
committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2022-02-15 17:34:51 +0000 |
commit | 4ac149951b2020b4a6dafb0455d3f523e7c9cfe6 (patch) | |
tree | 698d4471463b68bc16ce2f291a0eaab86bcb5e13 /src/dir.cpp | |
parent | Bump to C++20 for compat with other libs (diff) | |
download | netfs-gitfs-4ac149951b2020b4a6dafb0455d3f523e7c9cfe6.tar.bz2 netfs-gitfs-4ac149951b2020b4a6dafb0455d3f523e7c9cfe6.tar.xz netfs-gitfs-4ac149951b2020b4a6dafb0455d3f523e7c9cfe6.zip |
Fix up all warnings from all the toolsnetfs-gitfs-0.2.2
Diffstat (limited to 'src/dir.cpp')
-rw-r--r-- | src/dir.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dir.cpp b/src/dir.cpp index 9e524aa..f502c45 100644 --- a/src/dir.cpp +++ b/src/dir.cpp @@ -1,7 +1,16 @@ #include "dir.h" +#include "git.h" #include "repo.h" +#include <Ice/Current.h> #include <Ice/ObjectAdapter.h> +#include <cerrno> +#include <exceptions.h> +#include <git2.h> +#include <memory> +#include <string> #include <sys/stat.h> +#include <types.h> +#include <utility> GitFS::Directory::Directory(Repo * const r, std::string && p) : repo(r), path(std::move(p)), subTreeCacheRootId({}) { @@ -39,7 +48,7 @@ GitFS::Directory::readdir(const ::Ice::Current &) { const auto subTree = getSubtree(); NetFS::NameList list; - for (int idx = git_tree_entrycount(subTree.get()); idx--;) { + for (auto idx = git_tree_entrycount(subTree.get()); idx--;) { const auto entry = git_tree_entry_byindex(subTree.get(), idx); list.push_back(git_tree_entry_name(entry)); } @@ -51,7 +60,7 @@ GitFS::Directory::listdir(const ::Ice::Current &) { const auto subTree = getSubtree(); NetFS::DirectoryContents list; - for (int idx = git_tree_entrycount(subTree.get()); idx--;) { + for (auto idx = git_tree_entrycount(subTree.get()); idx--;) { const auto entry = git_tree_entry_byindex(subTree.get(), idx); NetFS::Attr a {}; a << *entry << *repo->commit; |