diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-16 16:29:06 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2025-08-16 16:29:06 +0100 |
commit | 0d97553a5e1d91edfc325f1d9f5cf8c8bdd6a496 (patch) | |
tree | a5869036a4b8109f7db71f8e3970d646622e5e8c /src/git.h | |
parent | Update branch names from master to main (diff) | |
download | netfs-gitfs-0d97553a5e1d91edfc325f1d9f5cf8c8bdd6a496.tar.bz2 netfs-gitfs-0d97553a5e1d91edfc325f1d9f5cf8c8bdd6a496.tar.xz netfs-gitfs-0d97553a5e1d91edfc325f1d9f5cf8c8bdd6a496.zip |
Fix-up all the clang-tidy warnings
Diffstat (limited to 'src/git.h')
-rw-r--r-- | src/git.h | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -12,10 +12,10 @@ namespace GitFS::Git { template<typename E, typename... P, typename... A> void - gitSafe(int (*func)(P...), A... p) + gitSafe(int (*func)(P...), A... params) { - if (int _giterror = func(p...)) { - throwError<E>(_giterror); + if (int giterror = func(params...)) { + throwError<E>(giterror); } } @@ -23,33 +23,33 @@ namespace GitFS::Git { template<typename E, typename R, typename... P, typename... A> auto - gitSafeGet(int (*get)(R **, P...), void (*release)(R *), A... p) + gitSafeGet(int (*get)(R **, P...), void (*release)(R *), A... params) { - R * r = nullptr; - gitSafe<E>(get, &r, p...); - return TPtr<R>(r, release); + R * rtn = nullptr; + gitSafe<E>(get, &rtn, params...); + return TPtr<R>(rtn, release); } - git_oid OidParse(const std::string_view & str); + git_oid oidParse(std::string_view str); using RepositoryPtr = TPtr<git_repository>; - RepositoryPtr RepositoryOpenBare(const std::string & path); + RepositoryPtr repositoryOpenBare(const std::string & path); using BlobPtr = TPtr<const git_blob>; - BlobPtr BlobLookup(const RepositoryPtr & repo, const git_oid & blob); + BlobPtr blobLookup(const RepositoryPtr & repo, const git_oid & blob); using CommitPtr = TPtr<const git_commit>; - CommitPtr CommitLookup(const RepositoryPtr & repo, const git_oid & commitId); + CommitPtr commitLookup(const RepositoryPtr & repo, const git_oid & commitId); using TreePtr = TPtr<const git_tree>; - TreePtr TreeLookup(const RepositoryPtr & repo, const git_oid & treeId); + TreePtr treeLookup(const RepositoryPtr & repo, const git_oid & treeId); using TreeEntryPtr = TPtr<const git_tree_entry>; - TreeEntryPtr TreeEntryByPath(const TreePtr & tree, const std::string & path); + TreeEntryPtr treeEntryByPath(const TreePtr & tree, const std::string & path); using RefPtr = TPtr<const git_reference>; - RefPtr Commitish(const RepositoryPtr & repo, const std::string & name); - RefPtr Resolve(const RefPtr &); + RefPtr commitish(const RepositoryPtr & repo, const std::string & name); + RefPtr resolve(const RefPtr &); } namespace NetFS { |