treewide: drop trivial leaf virtual inheritance

this does nothing on classes that are never used as base classes and
have only a single base class of their own. all of these classes are
also made final to prove that they are indeed in this category. once
we need to derive any of them we can erase their `final` specifiers.

Change-Id: I4bd8e50a58815227392b5a5a762fda4542d15bae
This commit is contained in:
eldritch horrors 2024-11-17 14:43:57 +01:00
parent 34e592ea6a
commit ac74dc3a2b
14 changed files with 18 additions and 18 deletions

View file

@ -32,7 +32,7 @@ public:
virtual ~ReplInteracter(){};
};
class ReadlineLikeInteracter : public virtual ReplInteracter
class ReadlineLikeInteracter final : public ReplInteracter
{
std::string historyFile;
public:
@ -50,7 +50,7 @@ public:
virtual ~ReadlineLikeInteracter() override;
};
class AutomationInteracter : public virtual ReplInteracter
class AutomationInteracter final : public ReplInteracter
{
public:
AutomationInteracter() = default;

View file

@ -966,7 +966,7 @@ bool LocalDerivationGoal::isAllowed(const DerivedPath & req)
}
struct RestrictedStoreConfig : virtual LocalFSStoreConfig
struct RestrictedStoreConfig final : LocalFSStoreConfig
{
using LocalFSStoreConfig::LocalFSStoreConfig;
const std::string name() override { return "Restricted Store"; }

View file

@ -3,7 +3,7 @@
namespace nix {
struct DummyStoreConfig : virtual StoreConfig {
struct DummyStoreConfig final : StoreConfig {
using StoreConfig::StoreConfig;
const std::string name() override { return "Dummy Store"; }
@ -16,7 +16,7 @@ struct DummyStoreConfig : virtual StoreConfig {
}
};
struct DummyStore : public virtual Store
struct DummyStore final : public Store
{
DummyStoreConfig config_;

View file

@ -8,7 +8,7 @@ namespace nix {
MakeError(UploadToHTTP, Error);
struct HttpBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig
struct HttpBinaryCacheStoreConfig final : BinaryCacheStoreConfig
{
using BinaryCacheStoreConfig::BinaryCacheStoreConfig;
@ -22,7 +22,7 @@ struct HttpBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig
}
};
class HttpBinaryCacheStore : public virtual BinaryCacheStore
class HttpBinaryCacheStore final : public BinaryCacheStore
{
private:

View file

@ -44,7 +44,7 @@ struct LegacySSHStoreConfigWithLog : LegacySSHStoreConfig
const Setting<int> logFD{this, -1, "log-fd", "file descriptor to which SSH's stderr is connected"};
};
struct LegacySSHStore : public virtual Store
struct LegacySSHStore final : public Store
{
LegacySSHStoreConfigWithLog config_;

View file

@ -7,7 +7,7 @@
namespace nix {
struct LocalBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig
struct LocalBinaryCacheStoreConfig final : BinaryCacheStoreConfig
{
using BinaryCacheStoreConfig::BinaryCacheStoreConfig;
@ -21,7 +21,7 @@ struct LocalBinaryCacheStoreConfig : virtual BinaryCacheStoreConfig
}
};
class LocalBinaryCacheStore : public virtual BinaryCacheStore
class LocalBinaryCacheStore final : public BinaryCacheStore
{
private:

View file

@ -37,7 +37,7 @@ struct OptimiseStats
uint64_t blocksFreed = 0;
};
struct LocalStoreConfig : virtual LocalFSStoreConfig
struct LocalStoreConfig final : LocalFSStoreConfig
{
using LocalFSStoreConfig::LocalFSStoreConfig;

View file

@ -184,7 +184,7 @@ S3Helper::FileTransferResult S3Helper::getObject(
return res;
}
struct S3BinaryCacheStoreConfig : virtual BinaryCacheStoreConfig
struct S3BinaryCacheStoreConfig final : BinaryCacheStoreConfig
{
using BinaryCacheStoreConfig::BinaryCacheStoreConfig;

View file

@ -27,7 +27,7 @@ struct SSHStoreConfig : virtual RemoteStoreConfig, virtual CommonSSHStoreConfig
}
};
class SSHStore : public virtual RemoteStore
class SSHStore final : public RemoteStore
{
SSHStoreConfig config_;

View file

@ -7,7 +7,7 @@
using namespace nix;
struct CmdConfig : virtual MultiCommand
struct CmdConfig final : MultiCommand
{
CmdConfig() : MultiCommand(RegisterCommand::getCommandsFor({"config"}))
{ }

View file

@ -2,7 +2,7 @@
using namespace nix;
struct CmdDerivation : virtual MultiCommand
struct CmdDerivation final : MultiCommand
{
CmdDerivation() : MultiCommand(RegisterCommand::getCommandsFor({"derivation"}))
{ }

View file

@ -5,7 +5,7 @@
using namespace nix;
struct CmdRealisation : virtual MultiCommand
struct CmdRealisation final : MultiCommand
{
CmdRealisation() : MultiCommand(RegisterCommand::getCommandsFor({"realisation"}))
{ }

View file

@ -204,7 +204,7 @@ struct CmdRegistryPin : RegistryCommand, EvalCommand
}
};
struct CmdRegistry : virtual MultiCommand
struct CmdRegistry final : MultiCommand
{
CmdRegistry()
: MultiCommand({

View file

@ -2,7 +2,7 @@
using namespace nix;
struct CmdStore : virtual MultiCommand
struct CmdStore final : MultiCommand
{
CmdStore() : MultiCommand(RegisterCommand::getCommandsFor({"store"}))
{ }