aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/dummy-store.cc
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-09-11 11:06:18 +0200
committerregnat <rg@regnat.ovh>2020-09-16 13:53:09 +0200
commit5895184df44e86ae55270390402c8263b0f24ae2 (patch)
tree0866ef276909936e47d67172708563c701ccf47e /src/libstore/dummy-store.cc
parentd184ad1d276006d4d003046710a56a019034a6a1 (diff)
Correctly call all the parent contructors of the stores
Using virtual inheritance means that only the default constructors of the parent classes will be called, which isn't what we want
Diffstat (limited to 'src/libstore/dummy-store.cc')
-rw-r--r--src/libstore/dummy-store.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libstore/dummy-store.cc b/src/libstore/dummy-store.cc
index d4560c13d..68d03d934 100644
--- a/src/libstore/dummy-store.cc
+++ b/src/libstore/dummy-store.cc
@@ -2,17 +2,22 @@
namespace nix {
-struct DummyStoreConfig : StoreConfig {};
+struct DummyStoreConfig : StoreConfig {
+ using StoreConfig::StoreConfig;
+};
-struct DummyStore : public Store
+struct DummyStore : public Store, public virtual DummyStoreConfig
{
DummyStore(const std::string uri, const Params & params)
: DummyStore(params)
{ }
DummyStore(const Params & params)
- : Store(params)
- { }
+ : StoreConfig(params)
+ , DummyStoreConfig(params)
+ , Store(params)
+ {
+ }
string getUri() override
{