diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-20T21·27+0100 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-20T21·27+0100 |
commit | 689ef502f5b0655c9923ed77da2ae3504630f473 (patch) | |
tree | 3e331c153646f136875f047cc3b9f0aad8c86341 /third_party/nix/src/libstore/local-store.hh | |
parent | d331d3a0b5c497a46e2636f308234be66566c04c (diff) |
refactor(3p/nix): Apply clang-tidy's readability-* fixes r/788
This applies the readability fixes listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html
Diffstat (limited to 'third_party/nix/src/libstore/local-store.hh')
-rw-r--r-- | third_party/nix/src/libstore/local-store.hh | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/third_party/nix/src/libstore/local-store.hh b/third_party/nix/src/libstore/local-store.hh index 47fa74a97be7..1a58df81613b 100644 --- a/third_party/nix/src/libstore/local-store.hh +++ b/third_party/nix/src/libstore/local-store.hh @@ -217,7 +217,7 @@ class LocalStore : public LocalFSStore { void makeStoreWritable(); - uint64_t queryValidPathId(State& state, const Path& path); + static uint64_t queryValidPathId(State& state, const Path& path); uint64_t addValidPath(State& state, const ValidPathInfo& info, bool checkOutputs = true); @@ -230,7 +230,7 @@ class LocalStore : public LocalFSStore { void verifyPath(const Path& path, const PathSet& store, PathSet& done, PathSet& validPaths, RepairFlag repair, bool& errors); - void updatePathInfo(State& state, const ValidPathInfo& info); + static void updatePathInfo(State& state, const ValidPathInfo& info); void upgradeStore6(); void upgradeStore7(); @@ -239,7 +239,7 @@ class LocalStore : public LocalFSStore { struct GCState; - void deleteGarbage(GCState& state, const Path& path); + static void deleteGarbage(GCState& state, const Path& path); void tryToDelete(GCState& state, const Path& path); @@ -247,8 +247,8 @@ class LocalStore : public LocalFSStore { void deletePathRecursive(GCState& state, const Path& path); - bool isActiveTempFile(const GCState& state, const Path& path, - const string& suffix); + static bool isActiveTempFile(const GCState& state, const Path& path, + const string& suffix); AutoCloseFD openGCLock(LockType lockType); @@ -267,18 +267,19 @@ class LocalStore : public LocalFSStore { typedef std::unordered_set<ino_t> InodeHash; InodeHash loadInodeHash(); - Strings readDirectoryIgnoringInodes(const Path& path, - const InodeHash& inodeHash); + static Strings readDirectoryIgnoringInodes(const Path& path, + const InodeHash& inodeHash); void optimisePath_(OptimiseStats& stats, const Path& path, InodeHash& inodeHash); // Internal versions that are not wrapped in retry_sqlite. - bool isValidPath_(State& state, const Path& path); - void queryReferrers(State& state, const Path& path, PathSet& referrers); + static bool isValidPath_(State& state, const Path& path); + static void queryReferrers(State& state, const Path& path, + PathSet& referrers); /* Add signatures to a ValidPathInfo using the secret keys specified by the ‘secret-key-files’ option. */ - void signPathInfo(ValidPathInfo& info); + static void signPathInfo(ValidPathInfo& info); Path getRealStoreDir() override { return realStoreDir; } |