summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2017-04-10 15:57:09 +0200
committerArne H Juul <arnej@yahoo-inc.com>2017-04-10 15:57:09 +0200
commit77761195e323161eb595bef6300e60c7a62e177c (patch)
tree2ae57ef33a7b22831b0b6404b28a122e19392ca1 /config
parent6b92af3f370a84a87472af361590512e9822f39a (diff)
add override in config module
Diffstat (limited to 'config')
-rw-r--r--config/src/apps/configproxy-cmd/main.cpp2
-rw-r--r--config/src/apps/getvespaconfig/getconfig.cpp2
-rw-r--r--config/src/apps/pingproxy/pingproxy.cpp2
-rw-r--r--config/src/tests/configagent/configagent.cpp38
-rw-r--r--config/src/tests/configmanager/configmanager.cpp10
-rw-r--r--config/src/tests/configretriever/configretriever.cpp8
-rw-r--r--config/src/tests/frt/frt.cpp34
-rw-r--r--config/src/tests/frtconnectionpool/frtconnectionpool.cpp2
-rw-r--r--config/src/tests/legacysubscriber/legacysubscriber.cpp2
-rw-r--r--config/src/tests/subscriber/subscriber.cpp16
-rw-r--r--config/src/tests/subscription/subscription.cpp6
-rw-r--r--config/src/tests/trace/trace.cpp2
-rw-r--r--config/src/vespa/config/helper/ifetchercallback.h2
-rw-r--r--config/src/vespa/config/helper/ihandle.h4
14 files changed, 65 insertions, 65 deletions
diff --git a/config/src/apps/configproxy-cmd/main.cpp b/config/src/apps/configproxy-cmd/main.cpp
index 3a8cf33c343..fcf2a0ca5d7 100644
--- a/config/src/apps/configproxy-cmd/main.cpp
+++ b/config/src/apps/configproxy-cmd/main.cpp
@@ -11,7 +11,7 @@ class Application : public FastOS_Application
bool parseOpts();
public:
void usage(void);
- int Main(void);
+ int Main(void) override;
Application() : _flags() {}
};
diff --git a/config/src/apps/getvespaconfig/getconfig.cpp b/config/src/apps/getvespaconfig/getconfig.cpp
index 820e0f7178e..23127b79333 100644
--- a/config/src/apps/getvespaconfig/getconfig.cpp
+++ b/config/src/apps/getvespaconfig/getconfig.cpp
@@ -32,7 +32,7 @@ public:
int usage();
void initRPC(const char *spec);
void finiRPC();
- virtual int Main();
+ virtual int Main() override;
};
diff --git a/config/src/apps/pingproxy/pingproxy.cpp b/config/src/apps/pingproxy/pingproxy.cpp
index db790820e64..667d5689691 100644
--- a/config/src/apps/pingproxy/pingproxy.cpp
+++ b/config/src/apps/pingproxy/pingproxy.cpp
@@ -24,7 +24,7 @@ public:
int usage();
void initRPC(const char *spec);
void finiRPC();
- virtual int Main();
+ virtual int Main() override;
};
diff --git a/config/src/tests/configagent/configagent.cpp b/config/src/tests/configagent/configagent.cpp
index 73394d443a4..91b657b42f2 100644
--- a/config/src/tests/configagent/configagent.cpp
+++ b/config/src/tests/configagent/configagent.cpp
@@ -19,22 +19,22 @@ public:
: _key(key)
{ }
- const ConfigKey & getKey() const
+ const ConfigKey & getKey() const override
{
return _key;
}
- bool abort()
+ bool abort() override
{
return false;
}
- bool isAborted() const
+ bool isAborted() const override
{
return false;
}
- void setError(int errorCode)
+ void setError(int errorCode) override
{
(void) errorCode;
}
@@ -57,52 +57,52 @@ public:
_isError(iserror)
{ }
- const ConfigKey& getKey() const
+ const ConfigKey& getKey() const override
{
return _key;
}
- const ConfigValue & getValue() const
+ const ConfigValue & getValue() const override
{
return _value;
}
- const ConfigState & getConfigState() const
+ const ConfigState & getConfigState() const override
{
return _state;
}
- bool hasValidResponse() const
+ bool hasValidResponse() const override
{
return _valid;
}
- bool validateResponse()
+ bool validateResponse() override
{
return _valid;
}
- void fill()
+ void fill() override
{
_fillCalled = true;
}
- vespalib::string errorMessage() const
+ vespalib::string errorMessage() const override
{
return _errorMessage;
}
- int errorCode() const
+ int errorCode() const override
{
return _errorCode;
}
- bool isError() const
+ bool isError() const override
{
return _isError;
}
- const Trace & getTrace() const { return _trace; }
+ const Trace & getTrace() const override { return _trace; }
const ConfigKey _key;
const ConfigValue _value;
@@ -145,24 +145,24 @@ public:
{
}
- std::unique_ptr<ConfigUpdate> provide()
+ std::unique_ptr<ConfigUpdate> provide() override
{
return std::move(_update);
}
- bool wait(uint64_t timeout)
+ bool wait(uint64_t timeout) override
{
(void) timeout;
return true;
}
- void handle(std::unique_ptr<ConfigUpdate> update)
+ void handle(std::unique_ptr<ConfigUpdate> update) override
{
_update = std::move(update);
}
- bool poll() { return true; }
- void interrupt() { }
+ bool poll() override { return true; }
+ void interrupt() override { }
private:
std::unique_ptr<ConfigUpdate> _update;
};
diff --git a/config/src/tests/configmanager/configmanager.cpp b/config/src/tests/configmanager/configmanager.cpp
index 1b20458b47e..427be97753b 100644
--- a/config/src/tests/configmanager/configmanager.cpp
+++ b/config/src/tests/configmanager/configmanager.cpp
@@ -36,19 +36,19 @@ namespace {
{
public:
MySource(TestContext * data, const IConfigHolder::SP & holder) : _holder(holder), _data(data) { }
- void getConfig()
+ void getConfig() override
{
_data->numGetConfig++;
if (_data->respond) {
_holder->handle(ConfigUpdate::UP(new ConfigUpdate(ConfigValue(), true, _data->generation)));
}
}
- void reload(int64_t generation)
+ void reload(int64_t generation) override
{
_data->numUpdate++;
_data->generation = generation;
}
- void close()
+ void close() override
{
_data->numClose++;
}
@@ -60,7 +60,7 @@ namespace {
{
public:
MySourceFactory(TestContext * d) : data(d) { }
- Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const
+ Source::UP createSource(const IConfigHolder::SP & holder, const ConfigKey & key) const override
{
(void) key;
return Source::UP(new MySource(data, holder));
@@ -77,7 +77,7 @@ namespace {
{
}
SourceSpecKey createKey() const { return SourceSpecKey(_key); }
- SourceFactory::UP createSourceFactory(const TimingValues & timingValues) const {
+ SourceFactory::UP createSourceFactory(const TimingValues & timingValues) const override {
(void) timingValues;
return SourceFactory::UP(new MySourceFactory(_data));
}
diff --git a/config/src/tests/configretriever/configretriever.cpp b/config/src/tests/configretriever/configretriever.cpp
index 9b191512e0e..bb4dda0e10e 100644
--- a/config/src/tests/configretriever/configretriever.cpp
+++ b/config/src/tests/configretriever/configretriever.cpp
@@ -106,9 +106,9 @@ struct SimpleSetup
struct MySource : public Source
{
- void getConfig() { }
- void close() { }
- void reload(int64_t gen) { (void) gen; }
+ void getConfig() override { }
+ void close() override { }
+ void reload(int64_t gen) override { (void) gen; }
};
struct SubscriptionFixture
@@ -130,7 +130,7 @@ namespace {
class FixedPayload : public protocol::Payload {
public:
- const Inspector & getSlimePayload() const
+ const Inspector & getSlimePayload() const override
{
return _data.get();
}
diff --git a/config/src/tests/frt/frt.cpp b/config/src/tests/frt/frt.cpp
index 89cf9dd9e6a..26f95df8f42 100644
--- a/config/src/tests/frt/frt.cpp
+++ b/config/src/tests/frt/frt.cpp
@@ -42,11 +42,11 @@ namespace {
: update(),
notified(false)
{ }
- ConfigUpdate::UP provide() { return ConfigUpdate::UP(); }
- void handle(ConfigUpdate::UP u) { update = std::move(u); }
+ ConfigUpdate::UP provide() override { return ConfigUpdate::UP(); }
+ void handle(ConfigUpdate::UP u) override { update = std::move(u); }
bool wait(int timeoutInMillis) { (void) timeoutInMillis; return notified; }
- bool poll() { return notified; }
- void interrupt() { }
+ bool poll() override { return notified; }
+ void interrupt() override { }
bool waitUntilResponse(int timeoutInMillis)
{
@@ -118,7 +118,7 @@ namespace {
{
bool aborted;
MyAbortHandler() : aborted(false) { }
- bool HandleAbort() { aborted = true; return true; }
+ bool HandleAbort() override { aborted = true; return true; }
};
struct ConnectionMock : public Connection {
@@ -130,9 +130,9 @@ namespace {
vespalib::string address;
ConnectionMock(FRT_RPCRequest * answer = NULL);
~ConnectionMock();
- FRT_RPCRequest * allocRPCRequest() { return supervisor.AllocRPCRequest(); }
- void setError(int ec) { errorCode = ec; }
- void invoke(FRT_RPCRequest * req, double t, FRT_IRequestWait * waiter)
+ FRT_RPCRequest * allocRPCRequest() override { return supervisor.AllocRPCRequest(); }
+ void setError(int ec) override { errorCode = ec; }
+ void invoke(FRT_RPCRequest * req, double t, FRT_IRequestWait * waiter) override
{
timeout = static_cast<int>(t);
if (ans != NULL)
@@ -140,8 +140,8 @@ namespace {
else
waiter->RequestDone(req);
}
- const vespalib::string & getAddress() const { return address; }
- void setTransientDelay(int64_t delay) { (void) delay; }
+ const vespalib::string & getAddress() const override { return address; }
+ void setTransientDelay(int64_t delay) override { (void) delay; }
};
ConnectionMock::ConnectionMock(FRT_RPCRequest * answer)
@@ -156,11 +156,11 @@ namespace {
struct FactoryMock : public ConnectionFactory {
ConnectionMock * current;
FactoryMock(ConnectionMock * c) : current(c) { }
- Connection * getCurrent() {
+ Connection * getCurrent() override {
return current;
}
- FNET_Scheduler * getScheduler() { return &current->scheduler; }
- void syncTransport() { }
+ FNET_Scheduler * getScheduler() override { return &current->scheduler; }
+ void syncTransport() override { }
};
@@ -187,10 +187,10 @@ namespace {
{
}
- const ConfigState & getConfigState() const { return result->state; }
- uint64_t getWaitTime () const { return result->waitTime; }
- uint64_t getTimeout() const { return result->timeout; }
- void handleResponse(const ConfigRequest & request, ConfigResponse::UP response)
+ const ConfigState & getConfigState() const override { return result->state; }
+ uint64_t getWaitTime () const override { return result->waitTime; }
+ uint64_t getTimeout() const override { return result->timeout; }
+ void handleResponse(const ConfigRequest & request, ConfigResponse::UP response) override
{
(void) request;
(void) response;
diff --git a/config/src/tests/frtconnectionpool/frtconnectionpool.cpp b/config/src/tests/frtconnectionpool/frtconnectionpool.cpp
index 93163065eae..96dad86a54d 100644
--- a/config/src/tests/frtconnectionpool/frtconnectionpool.cpp
+++ b/config/src/tests/frtconnectionpool/frtconnectionpool.cpp
@@ -15,7 +15,7 @@ private:
static ServerSpec::HostSpecList _sources;
void verifyAllSourcesInRotation(FRTConnectionPool& sourcePool);
public:
- int Main();
+ int Main() override;
void testBasicRoundRobin();
void testBasicHashBasedSelection();
void testSetErrorRoundRobin();
diff --git a/config/src/tests/legacysubscriber/legacysubscriber.cpp b/config/src/tests/legacysubscriber/legacysubscriber.cpp
index feae0a1d1a4..86ea70ead4f 100644
--- a/config/src/tests/legacysubscriber/legacysubscriber.cpp
+++ b/config/src/tests/legacysubscriber/legacysubscriber.cpp
@@ -14,7 +14,7 @@ class MyCallback : public IFetcherCallback<ConfigType>
{
public:
MyCallback() : _config(), _configured(false) { }
- void configure(std::unique_ptr<ConfigType> config)
+ void configure(std::unique_ptr<ConfigType> config) override
{
_configured = true;
_config = std::move(config);
diff --git a/config/src/tests/subscriber/subscriber.cpp b/config/src/tests/subscriber/subscriber.cpp
index 0d5d2698b42..fa6dfcca01f 100644
--- a/config/src/tests/subscriber/subscriber.cpp
+++ b/config/src/tests/subscriber/subscriber.cpp
@@ -57,9 +57,9 @@ namespace {
class MySource : public Source
{
- void getConfig() { }
- void close() { }
- void reload(int64_t gen) { (void) gen; }
+ void getConfig() override { }
+ void close() override { }
+ void reload(int64_t gen) override { (void) gen; }
};
class MyManager : public IConfigManager
@@ -77,7 +77,7 @@ namespace {
MyManager() : idCounter(0), numCancel(0) { }
- ConfigSubscription::SP subscribe(const ConfigKey & key, uint64_t timeoutInMillis) {
+ ConfigSubscription::SP subscribe(const ConfigKey & key, uint64_t timeoutInMillis) override {
(void) timeoutInMillis;
IConfigHolder::SP holder(new ConfigHolder());
_holders.push_back(holder);
@@ -85,7 +85,7 @@ namespace {
ConfigSubscription::SP s(new ConfigSubscription(0, key, holder, Source::UP(new MySource())));
return s;
}
- void unsubscribe(const ConfigSubscription::SP & subscription) {
+ void unsubscribe(const ConfigSubscription::SP & subscription) override {
(void) subscription;
numCancel++;
}
@@ -105,7 +105,7 @@ namespace {
_holders[index]->handle(ConfigUpdate::UP(new ConfigUpdate(value, false, generation)));
}
- void reload(int64_t generation)
+ void reload(int64_t generation) override
{
(void) generation;
}
@@ -126,7 +126,7 @@ namespace {
_m(rhs._m)
{ }
- IConfigManager & getManagerInstance() {
+ IConfigManager & getManagerInstance() override {
return _m;
}
@@ -135,7 +135,7 @@ namespace {
return getManagerInstance();
}
- void reload() { }
+ void reload() override { }
};
struct StandardFixture {
diff --git a/config/src/tests/subscription/subscription.cpp b/config/src/tests/subscription/subscription.cpp
index 69cba9707fe..e47f8b11e60 100644
--- a/config/src/tests/subscription/subscription.cpp
+++ b/config/src/tests/subscription/subscription.cpp
@@ -28,9 +28,9 @@ namespace {
: source(src)
{}
- void getConfig() { source->numGetConfig++; }
- void close() { source->numClose++; }
- void reload(int64_t gen) { (void) gen; source->numReload++; }
+ void getConfig() override { source->numGetConfig++; }
+ void close() override { source->numClose++; }
+ void reload(int64_t gen) override { (void) gen; source->numReload++; }
SourceFixture * source;
};
diff --git a/config/src/tests/trace/trace.cpp b/config/src/tests/trace/trace.cpp
index 9945acae485..566077d47e1 100644
--- a/config/src/tests/trace/trace.cpp
+++ b/config/src/tests/trace/trace.cpp
@@ -15,7 +15,7 @@ struct FixedClock : public Clock
{
FixedClock() : currentTime(0) { }
int64_t currentTime;
- int64_t currentTimeMillis() const { return currentTime; }
+ int64_t currentTimeMillis() const override { return currentTime; }
};
TEST("that trace can be serialized and deserialized") {
diff --git a/config/src/vespa/config/helper/ifetchercallback.h b/config/src/vespa/config/helper/ifetchercallback.h
index 19ad4a8984b..9bc6e848827 100644
--- a/config/src/vespa/config/helper/ifetchercallback.h
+++ b/config/src/vespa/config/helper/ifetchercallback.h
@@ -29,7 +29,7 @@ class IFetcherCallback : public ICallback
public:
virtual ~IFetcherCallback() { }
protected:
- virtual void configure(std::unique_ptr<const ConfigInstance> config) {
+ virtual void configure(std::unique_ptr<const ConfigInstance> config) override {
configure(std::unique_ptr<ConfigType>(static_cast<const ConfigType *>(config.release())));
}
virtual void configure(std::unique_ptr<ConfigType> config) = 0;
diff --git a/config/src/vespa/config/helper/ihandle.h b/config/src/vespa/config/helper/ihandle.h
index d84f324487a..f5a4c9dbd2b 100644
--- a/config/src/vespa/config/helper/ihandle.h
+++ b/config/src/vespa/config/helper/ihandle.h
@@ -23,10 +23,10 @@ public:
{
}
- std::unique_ptr<const ConfigInstance> getConfig() {
+ std::unique_ptr<const ConfigInstance> getConfig() override {
return std::unique_ptr<const ConfigInstance>(_handle->getConfig().release());
}
- bool isChanged() { return _handle->isChanged(); }
+ bool isChanged() override { return _handle->isChanged(); }
private:
std::unique_ptr<ConfigHandle <ConfigType> > _handle;
};