summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-07-29 20:56:12 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-07-29 20:56:12 +0100
commit530f5452d2b28617286802908671d38b44f6f9e6 (patch)
tree57aa25b94d3f10035fa486b7c2ac4738037b8415
parentSupport working tree based on a commit, tag or branch (diff)
downloadnetfs-gitfs-530f5452d2b28617286802908671d38b44f6f9e6.tar.bz2
netfs-gitfs-530f5452d2b28617286802908671d38b44f6f9e6.tar.xz
netfs-gitfs-530f5452d2b28617286802908671d38b44f6f9e6.zip
Fix constness of repo pointers
-rw-r--r--src/blob.cpp2
-rw-r--r--src/blob.h4
-rw-r--r--src/dir.cpp2
-rw-r--r--src/dir.h4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/blob.cpp b/src/blob.cpp
index ed0e633..188c9c5 100644
--- a/src/blob.cpp
+++ b/src/blob.cpp
@@ -3,7 +3,7 @@
#include "blob.h"
#include "repo.h"
-GitFS::Blob::Blob(const Repo * r, const std::string & path) :
+GitFS::Blob::Blob(const Repo * const r, const std::string & path) :
repo(r),
entry(Git::TreeEntryByPath(repo->tree, path)),
blob(getBlob()),
diff --git a/src/blob.h b/src/blob.h
index e1dd86f..335186e 100644
--- a/src/blob.h
+++ b/src/blob.h
@@ -9,7 +9,7 @@ namespace GitFS {
class Repo;
class Blob : public File {
public:
- Blob(const Repo * r, const std::string &);
+ Blob(const Repo * const r, const std::string &);
void close(const ::Ice::Current& current) override;
Attr fgetattr(ReqEnv env, const ::Ice::Current& current) override;
@@ -19,7 +19,7 @@ namespace GitFS {
private:
Git::BlobPtr getBlob() const;
- const Repo * repo;
+ const Repo * const repo;
Git::TreeEntryPtr entry;
Git::BlobPtr blob;
const decltype(git_blob_rawsize({})) blobSize;
diff --git a/src/dir.cpp b/src/dir.cpp
index 98c05cb..012baa5 100644
--- a/src/dir.cpp
+++ b/src/dir.cpp
@@ -3,7 +3,7 @@
#include "repo.h"
#include "dir.h"
-GitFS::Directory::Directory(const Repo * r, const std::string & p) :
+GitFS::Directory::Directory(Repo * const r, const std::string & p) :
repo(r),
path(p),
subTreeCacheRootId({})
diff --git a/src/dir.h b/src/dir.h
index 7174976..365adcc 100644
--- a/src/dir.h
+++ b/src/dir.h
@@ -9,7 +9,7 @@ namespace GitFS {
class Repo;
class Directory : public DirectoryV2 {
public:
- Directory(const Repo * r, const std::string &);
+ Directory(Repo * const r, const std::string &);
void close(const ::Ice::Current& current) override;
NameList readdir(const ::Ice::Current& current) override;
@@ -17,7 +17,7 @@ namespace GitFS {
private:
Git::TreePtr getSubtree() const;
- const Repo * repo;
+ Repo * const repo;
const std::string path;
mutable Git::TreePtr subTreeCache;