From 49517304c4a564f45e66d1ba6ba2293d865c398b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 23 Aug 2020 19:38:01 +0100 Subject: Simpler, const pointer typedefs --- src/git.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/git.h b/src/git.h index 38a89d3..46bdb18 100644 --- a/src/git.h +++ b/src/git.h @@ -30,23 +30,22 @@ namespace GitFS::Git { git_oid OidParse(const std::string_view & str); - using RepositoryPtr = decltype(gitSafeGet(git_repository_open_bare, git_repository_free, nullptr)); + using RepositoryPtr = TPtr; RepositoryPtr RepositoryOpenBare(const std::string & path); - using BlobPtr = decltype(gitSafeGet(git_blob_lookup, git_blob_free, nullptr, nullptr)); + using BlobPtr = TPtr; BlobPtr BlobLookup(const RepositoryPtr & repo, const git_oid & blob); - using CommitPtr = decltype(gitSafeGet(git_commit_lookup, git_commit_free, nullptr, nullptr)); + using CommitPtr = TPtr; CommitPtr CommitLookup(const RepositoryPtr & repo, const git_oid & commitId); - using TreePtr = decltype(gitSafeGet(git_tree_lookup, git_tree_free, nullptr, nullptr)); + using TreePtr = TPtr; TreePtr TreeLookup(const RepositoryPtr & repo, const git_oid & treeId); - using TreeEntryPtr - = decltype(gitSafeGet(git_tree_entry_bypath, git_tree_entry_free, nullptr, nullptr)); + using TreeEntryPtr = TPtr; TreeEntryPtr TreeEntryByPath(const TreePtr & tree, const std::string & path); - using RefPtr = decltype(gitSafeGet(git_reference_dwim, git_reference_free, nullptr, nullptr)); + using RefPtr = TPtr; RefPtr Commitish(const RepositoryPtr & repo, const std::string & name); RefPtr Resolve(const RefPtr &); } -- cgit v1.2.3