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/blob.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/blob.h')
-rw-r--r-- | src/blob.h | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -4,8 +4,10 @@ #include "git.h" #include <file.h> #include <git2.h> +#include <span> #include <string> #include <types.h> + namespace Ice { struct Current; } @@ -13,27 +15,26 @@ namespace Ice { namespace GitFS { using namespace NetFS; class Repo; + class Blob : public File { public: - Blob(const Repo * const r, std::string &&); + Blob(const Repo * repo, const std::string &); - void close(const ::Ice::Current & current) override; - Attr fgetattr(const ::Ice::Current & current) override; - Buffer read(long long int offset, long long int size, const ::Ice::Current & current) override; - void ftruncate(long long int size, const ::Ice::Current & current) override; + void close(const ::Ice::Current & ice) override; + Attr fgetattr(const ::Ice::Current & ice) override; + Buffer read(long long int offset, long long int size, const ::Ice::Current & ice) override; + void ftruncate(long long int size, const ::Ice::Current & ice) override; void write(long long int offset, long long int size, std::pair<const Ice::Byte *, const Ice::Byte *> data, - const ::Ice::Current & current) override; + const ::Ice::Current & ice) override; long long int copyrange( FilePrxPtr, long long int, long long int, long long int, int, const Ice::Current &) override; private: - Git::BlobPtr getBlob() const; + [[nodiscard]] Git::BlobPtr getBlob() const; const Repo * const repo; Git::TreeEntryPtr entry; Git::BlobPtr blob; - using BlobSize = decltype(git_blob_rawsize({})); - const BlobSize blobSize; - const char * const blobContent; + std::span<const ::Ice::Byte> blobContent; }; } |