aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/local-store.hh
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/local-store.hh
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/local-store.hh')
-rw-r--r--src/libstore/local-store.hh15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libstore/local-store.hh b/src/libstore/local-store.hh
index 8b6972847..0265f0837 100644
--- a/src/libstore/local-store.hh
+++ b/src/libstore/local-store.hh
@@ -30,8 +30,17 @@ struct OptimiseStats
uint64_t blocksFreed = 0;
};
+struct LocalStoreConfig : virtual LocalFSStoreConfig
+{
+ using LocalFSStoreConfig::LocalFSStoreConfig;
+
+ Setting<bool> requireSigs{(StoreConfig*) this,
+ settings.requireSigs,
+ "require-sigs", "whether store paths should have a trusted signature on import"};
+};
-class LocalStore : public LocalFSStore
+
+class LocalStore : public LocalFSStore, public virtual LocalStoreConfig
{
private:
@@ -95,10 +104,6 @@ public:
private:
- Setting<bool> requireSigs{(StoreConfig*) this,
- settings.requireSigs,
- "require-sigs", "whether store paths should have a trusted signature on import"};
-
const PublicKeys & getPublicKeys();
public: