From f759884235b4594c4f960ea0c587697eef717665 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 22 Aug 2020 15:26:11 +0100 Subject: Clang-format --- src/blob.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'src/blob.cpp') diff --git a/src/blob.cpp b/src/blob.cpp index 6311b31..4e1b2de 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -1,13 +1,10 @@ -#include -#include #include "blob.h" #include "repo.h" +#include +#include GitFS::Blob::Blob(const Repo * const r, std::string && path) : - repo(r), - entry(Git::TreeEntryByPath(repo->tree, path)), - blob(getBlob()), - blobSize(git_blob_rawsize(blob.get())), + repo(r), entry(Git::TreeEntryByPath(repo->tree, path)), blob(getBlob()), blobSize(git_blob_rawsize(blob.get())), blobContent(static_cast(git_blob_rawcontent(blob.get()))) { } @@ -28,14 +25,13 @@ GitFS::Blob::getBlob() const } void -GitFS::Blob::close(const ::Ice::Current& current) +GitFS::Blob::close(const ::Ice::Current & current) { current.adapter->remove(current.id); } - NetFS::Attr -GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current&) +GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current &) { NetFS::Attr a; a << *blob << *entry << *repo->commit; @@ -44,9 +40,8 @@ GitFS::Blob::fgetattr(ReqEnv, const ::Ice::Current&) return a; } - NetFS::Buffer -GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current&) +GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current &) { const decltype(blobSize) offset(o); const decltype(blobSize) size(s); @@ -57,18 +52,14 @@ GitFS::Blob::read(long long int o, long long int s, const ::Ice::Current&) return NetFS::Buffer(blobContent + offset, blobContent + offset + len); } - void -GitFS::Blob::ftruncate(ReqEnv, long long int, const ::Ice::Current&) +GitFS::Blob::ftruncate(ReqEnv, long long int, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } - void -GitFS::Blob::write(long long int, long long int, Buffer, const ::Ice::Current&) +GitFS::Blob::write(long long int, long long int, Buffer, const ::Ice::Current &) { throw NetFS::SystemError(EROFS); } - - -- cgit v1.2.3