From 0d97553a5e1d91edfc325f1d9f5cf8c8bdd6a496 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 16 Aug 2025 16:29:06 +0100 Subject: Fix-up all the clang-tidy warnings --- src/git.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/git.h') diff --git a/src/git.h b/src/git.h index 1dce92e..bc82fef 100644 --- a/src/git.h +++ b/src/git.h @@ -12,10 +12,10 @@ namespace GitFS::Git { template void - gitSafe(int (*func)(P...), A... p) + gitSafe(int (*func)(P...), A... params) { - if (int _giterror = func(p...)) { - throwError(_giterror); + if (int giterror = func(params...)) { + throwError(giterror); } } @@ -23,33 +23,33 @@ namespace GitFS::Git { template 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(get, &r, p...); - return TPtr(r, release); + R * rtn = nullptr; + gitSafe(get, &rtn, params...); + return TPtr(rtn, release); } - git_oid OidParse(const std::string_view & str); + git_oid oidParse(std::string_view str); using RepositoryPtr = TPtr; - RepositoryPtr RepositoryOpenBare(const std::string & path); + RepositoryPtr repositoryOpenBare(const std::string & path); using BlobPtr = TPtr; - BlobPtr BlobLookup(const RepositoryPtr & repo, const git_oid & blob); + BlobPtr blobLookup(const RepositoryPtr & repo, const git_oid & blob); using CommitPtr = TPtr; - CommitPtr CommitLookup(const RepositoryPtr & repo, const git_oid & commitId); + CommitPtr commitLookup(const RepositoryPtr & repo, const git_oid & commitId); using TreePtr = TPtr; - TreePtr TreeLookup(const RepositoryPtr & repo, const git_oid & treeId); + TreePtr treeLookup(const RepositoryPtr & repo, const git_oid & treeId); using TreeEntryPtr = TPtr; - TreeEntryPtr TreeEntryByPath(const TreePtr & tree, const std::string & path); + TreeEntryPtr treeEntryByPath(const TreePtr & tree, const std::string & path); using RefPtr = TPtr; - 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 { -- cgit v1.2.3