mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Deduplicate the Store downcasting with a template
This commit is contained in:
parent
678d1c2aa0
commit
a03b1fd7f6
11 changed files with 39 additions and 41 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue