diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-09 15:27:48 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-11 13:32:33 +0000 |
commit | a03b1fd7f60788304f358d5f4dc063c7c9e650a9 (patch) | |
tree | e5ec34a44b96ad4b384aca9343033292b26606fb /src/libstore/gc-store.hh | |
parent | 678d1c2aa0f499466c723d3461277dc197515f57 (diff) |
Deduplicate the Store downcasting with a template
Diffstat (limited to 'src/libstore/gc-store.hh')
-rw-r--r-- | src/libstore/gc-store.hh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/gc-store.hh b/src/libstore/gc-store.hh index 462cc097b..b3cbbad74 100644 --- a/src/libstore/gc-store.hh +++ b/src/libstore/gc-store.hh @@ -61,6 +61,8 @@ struct GCResults struct GcStore : public virtual Store { + inline static std::string operationName = "Garbage collection"; + /* Add an indirect root, which is merely a symlink to `path' from /nix/var/nix/gcroots/auto/<hash of `path'>. `path' is supposed to be a symlink to a store path. The garbage collector will @@ -77,8 +79,6 @@ struct GcStore : public virtual Store /* Perform a garbage collection. */ virtual void collectGarbage(const GCOptions & options, GCResults & results) = 0; - - static GcStore & require(Store & store); }; } |