diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 15:33:12 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-12-20 15:47:14 +0000 |
commit | 1a1af75338cb9ed28dc00de2e696d8efc5d37287 (patch) | |
tree | 75d1c9758d5b2cf1ae453145ed170fdbf108ab10 /src/libstore/local-binary-cache-store.cc | |
parent | ec3e20283216374c15843c403363a890221d3fcb (diff) |
Overhaul store subclassing
We embrace virtual the rest of the way, and get rid of the
`assert(false)` 0-param constructors.
We also list config base classes first, so the constructor order is
always:
1. all the configs
2. all the stores
Each in the same order
Diffstat (limited to 'src/libstore/local-binary-cache-store.cc')
-rw-r--r-- | src/libstore/local-binary-cache-store.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstore/local-binary-cache-store.cc b/src/libstore/local-binary-cache-store.cc index bb7464989..a58b7733f 100644 --- a/src/libstore/local-binary-cache-store.cc +++ b/src/libstore/local-binary-cache-store.cc @@ -11,7 +11,7 @@ struct LocalBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig const std::string name() override { return "Local Binary Cache Store"; } }; -class LocalBinaryCacheStore : public BinaryCacheStore, public virtual LocalBinaryCacheStoreConfig +class LocalBinaryCacheStore : public virtual LocalBinaryCacheStoreConfig, public virtual BinaryCacheStore { private: @@ -24,6 +24,9 @@ public: const Path & binaryCacheDir, const Params & params) : StoreConfig(params) + , BinaryCacheStoreConfig(params) + , LocalBinaryCacheStoreConfig(params) + , Store(params) , BinaryCacheStore(params) , binaryCacheDir(binaryCacheDir) { |