aboutsummaryrefslogtreecommitdiff
path: root/src/nix/optimise-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-06-18 16:01:35 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-06-18 16:25:31 +0200
commita0de58f471c9087d8e6cc60a6078f9940a125b15 (patch)
tree45211b7ecd10f372c9a4a8e4b6cba7a30560ce21 /src/nix/optimise-store.cc
parenteb18aedccbc0d01b6a5cc720ce1befd0b316aebf (diff)
Make subcommand construction in MultiCommand lazy
Diffstat (limited to 'src/nix/optimise-store.cc')
-rw-r--r--src/nix/optimise-store.cc11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/nix/optimise-store.cc b/src/nix/optimise-store.cc
index 725fb75a1..fed012b04 100644
--- a/src/nix/optimise-store.cc
+++ b/src/nix/optimise-store.cc
@@ -8,15 +8,6 @@ using namespace nix;
struct CmdOptimiseStore : StoreCommand
{
- CmdOptimiseStore()
- {
- }
-
- std::string name() override
- {
- return "optimise-store";
- }
-
std::string description() override
{
return "replace identical files in the store by hard links";
@@ -38,4 +29,4 @@ struct CmdOptimiseStore : StoreCommand
}
};
-static RegisterCommand r1(make_ref<CmdOptimiseStore>());
+static auto r1 = registerCommand<CmdOptimiseStore>("optimise-store");