diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-03-28 14:10:13 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2023-03-28 14:11:38 +0000 |
commit | 7596d495deaf00bda3e56ea1f27b6a6e39998099 (patch) | |
tree | 9a92ac553b632c752d03c2879424de229b2eb850 /storage | |
parent | af6e75155a0974d4c3b4a3ea689ba1f195a5ae64 (diff) |
Minor code cleanups; no changes in semantics
Diffstat (limited to 'storage')
5 files changed, 12 insertions, 12 deletions
diff --git a/storage/src/vespa/storage/frameworkimpl/thread/appkiller.h b/storage/src/vespa/storage/frameworkimpl/thread/appkiller.h index de8005bf914..4c6b25c9d2c 100644 --- a/storage/src/vespa/storage/frameworkimpl/thread/appkiller.h +++ b/storage/src/vespa/storage/frameworkimpl/thread/appkiller.h @@ -17,7 +17,7 @@ namespace storage { struct AppKiller { using UP = std::unique_ptr<AppKiller>; - virtual ~AppKiller() {} + virtual ~AppKiller() = default; virtual void kill() = 0; }; diff --git a/storage/src/vespa/storage/storageserver/servicelayernode.h b/storage/src/vespa/storage/storageserver/servicelayernode.h index 4f4af71ef57..4b719a0330b 100644 --- a/storage/src/vespa/storage/storageserver/servicelayernode.h +++ b/storage/src/vespa/storage/storageserver/servicelayernode.h @@ -44,7 +44,7 @@ public: ApplicationGenerationFetcher& generationFetcher, spi::PersistenceProvider& persistenceProvider, const VisitorFactory::Map& externalVisitors); - ~ServiceLayerNode(); + ~ServiceLayerNode() override; /** * Init must be called exactly once after construction and before destruction. */ diff --git a/storage/src/vespa/storage/storageserver/storagenode.cpp b/storage/src/vespa/storage/storageserver/storagenode.cpp index 9f8456afc37..f0f410d3076 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.cpp +++ b/storage/src/vespa/storage/storageserver/storagenode.cpp @@ -364,7 +364,7 @@ StorageNode::shutdown() LOG(debug, "Storage killed before requestShutdown() was called. No " "reason has been given for why we're stopping."); } - // Remove the subscription to avoid more callbacks from config + // Remove the subscription to avoid more callbacks from config removeConfigSubscriptions(); if (_chain) { diff --git a/storage/src/vespa/storage/storageserver/storagenode.h b/storage/src/vespa/storage/storageserver/storagenode.h index 19b930c184f..344181adad5 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.h +++ b/storage/src/vespa/storage/storageserver/storagenode.h @@ -138,18 +138,18 @@ private: void configure(std::unique_ptr<BucketspacesConfig>) override; protected: - // Lock taken while doing configuration of the server. + // Lock taken while doing configuration of the server. std::mutex _configLock; std::mutex _initial_config_mutex; using InitialGuard = std::lock_guard<std::mutex>; - // Current running config. Kept, such that we can see what has been - // changed in live config updates. + // Current running config. Kept, such that we can see what has been + // changed in live config updates. std::unique_ptr<StorServerConfig> _serverConfig; std::unique_ptr<UpgradingConfig> _clusterConfig; std::unique_ptr<StorDistributionConfig> _distributionConfig; std::unique_ptr<document::config::DocumenttypesConfig> _doctypesConfig; std::unique_ptr<BucketspacesConfig> _bucketSpacesConfig; - // New configs gotten that has yet to have been handled + // New configs gotten that has yet to have been handled std::unique_ptr<StorServerConfig> _newServerConfig; std::unique_ptr<UpgradingConfig> _newClusterConfig; std::unique_ptr<StorDistributionConfig> _newDistributionConfig; diff --git a/storage/src/vespa/storageframework/generic/thread/thread.h b/storage/src/vespa/storageframework/generic/thread/thread.h index 6be65667b0f..80ddf33b79a 100644 --- a/storage/src/vespa/storageframework/generic/thread/thread.h +++ b/storage/src/vespa/storageframework/generic/thread/thread.h @@ -32,15 +32,15 @@ class Thread : public ThreadHandle { public: using UP = std::unique_ptr<Thread>; - Thread(vespalib::stringref id) : _id(id) {} - virtual ~Thread() = default; + explicit Thread(vespalib::stringref id) : _id(id) {} + ~Thread() override = default; - virtual const vespalib::string& getId() const { return _id; } + [[nodiscard]] virtual const vespalib::string& getId() const { return _id; } /** Check whether thread have been interrupted or not. */ - virtual bool interrupted() const override = 0; + [[nodiscard]] bool interrupted() const override = 0; /** Check whether thread have been joined or not. */ - virtual bool joined() const = 0; + [[nodiscard]] virtual bool joined() const = 0; /** * Call this function to set interrupt flag, such that later calls to |