summaryrefslogtreecommitdiffstats
path: root/storageframework
diff options
context:
space:
mode:
authorArne H Juul <arnej@yahoo-inc.com>2017-04-10 15:57:22 +0200
committerArne H Juul <arnej@yahoo-inc.com>2017-04-10 15:57:22 +0200
commit3b12afea60df4bd9514f5d4195b9d018e307e9d0 (patch)
tree99b9f0e6289d2ff137969b45fb6ba0338fd90646 /storageframework
parent79ccb477c1fcf6e5bf2fef0e214e0ecab5bbbffa (diff)
add override in storageframework module
Diffstat (limited to 'storageframework')
-rw-r--r--storageframework/src/tests/clock/timetest.cpp4
-rw-r--r--storageframework/src/tests/memory/memorymanagertest.cpp7
-rw-r--r--storageframework/src/tests/memory/memorystatetest.cpp16
-rw-r--r--storageframework/src/tests/thread/taskthreadtest.cpp2
-rw-r--r--storageframework/src/tests/thread/tickingthreadtest.cpp12
5 files changed, 20 insertions, 21 deletions
diff --git a/storageframework/src/tests/clock/timetest.cpp b/storageframework/src/tests/clock/timetest.cpp
index c41676e5f4d..ae07559e095 100644
--- a/storageframework/src/tests/clock/timetest.cpp
+++ b/storageframework/src/tests/clock/timetest.cpp
@@ -10,8 +10,8 @@ namespace defaultimplementation {
struct TimeTest : public CppUnit::TestFixture
{
- void setUp() {}
- void tearDown() {}
+ void setUp() override {}
+ void tearDown() override {}
void testBasics();
void testCreatedFromClock();
diff --git a/storageframework/src/tests/memory/memorymanagertest.cpp b/storageframework/src/tests/memory/memorymanagertest.cpp
index 50bca7b5b58..885ae86e832 100644
--- a/storageframework/src/tests/memory/memorymanagertest.cpp
+++ b/storageframework/src/tests/memory/memorymanagertest.cpp
@@ -155,8 +155,7 @@ MemoryManagerTest::testBasics()
struct ReduceI : public framework::ReduceMemoryUsageInterface {
framework::MemoryToken::UP _token;
- virtual uint64_t reduceMemoryConsumption(const MemoryToken& token,
- uint64_t reduceBy)
+ virtual uint64_t reduceMemoryConsumption(const MemoryToken& token, uint64_t reduceBy) override
{
assert(&token == _token.get());
(void) &token;
@@ -283,12 +282,12 @@ struct MemoryManagerLoadGiver : public document::Runnable,
{
}
- uint64_t reduceMemoryConsumption(const MemoryToken&, uint64_t reduceBy) {
+ uint64_t reduceMemoryConsumption(const MemoryToken&, uint64_t reduceBy) override {
++_reduced;
return reduceBy;
}
- void run() {
+ void run() override {
ReduceMemoryUsageInterface* reducer = 0;
if (_type.isCache()) reducer = this;
vespalib::RandomGen randomizer;
diff --git a/storageframework/src/tests/memory/memorystatetest.cpp b/storageframework/src/tests/memory/memorystatetest.cpp
index 6099745e30b..40d102199d6 100644
--- a/storageframework/src/tests/memory/memorystatetest.cpp
+++ b/storageframework/src/tests/memory/memorystatetest.cpp
@@ -12,8 +12,8 @@ namespace defaultimplementation {
struct MemoryStateTest : public CppUnit::TestFixture
{
- void setUp() {}
- void tearDown() {}
+ void setUp() override {}
+ void tearDown() override {}
void testBasics();
@@ -30,16 +30,16 @@ private:
std::map<std::string, framework::MemoryAllocationType> _types;
public:
- virtual void setMaximumMemoryUsage(uint64_t max) { (void) max; }
+ virtual void setMaximumMemoryUsage(uint64_t max) override { (void) max; }
virtual const framework::MemoryAllocationType&
- registerAllocationType(const framework::MemoryAllocationType& type) {
+ registerAllocationType(const framework::MemoryAllocationType& type) override {
_types[type.getName()] = type;
return _types[type.getName()];
}
virtual const framework::MemoryAllocationType&
- getAllocationType(const std::string& name) const {
+ getAllocationType(const std::string& name) const override {
std::map<std::string, framework::MemoryAllocationType>::const_iterator iter =
_types.find(name);
@@ -50,7 +50,7 @@ public:
return iter->second;
}
- virtual std::vector<const MemoryAllocationType*> getAllocationTypes() const
+ virtual std::vector<const MemoryAllocationType*> getAllocationTypes() const override
{
std::vector<const MemoryAllocationType*> types;
for(std::map<std::string, framework::MemoryAllocationType>
@@ -65,12 +65,12 @@ public:
uint64_t,
uint64_t,
uint8_t,
- framework::ReduceMemoryUsageInterface*)
+ framework::ReduceMemoryUsageInterface*) override
{
return framework::MemoryToken::UP();
}
- uint64_t getMemorySizeFreeForPriority(uint8_t priority) const {
+ uint64_t getMemorySizeFreeForPriority(uint8_t priority) const override {
(void) priority;
return 0;
}
diff --git a/storageframework/src/tests/thread/taskthreadtest.cpp b/storageframework/src/tests/thread/taskthreadtest.cpp
index 36d3a8abfab..bca5c81ef01 100644
--- a/storageframework/src/tests/thread/taskthreadtest.cpp
+++ b/storageframework/src/tests/thread/taskthreadtest.cpp
@@ -34,7 +34,7 @@ namespace {
struct MyThread : public TaskThread<Task> {
MyThread(ThreadLock& lock) : TaskThread<Task>(lock) {}
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) {
+ virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) override {
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
};
diff --git a/storageframework/src/tests/thread/tickingthreadtest.cpp b/storageframework/src/tests/thread/tickingthreadtest.cpp
index 508cadc6fbd..c65b809e5da 100644
--- a/storageframework/src/tests/thread/tickingthreadtest.cpp
+++ b/storageframework/src/tests/thread/tickingthreadtest.cpp
@@ -13,8 +13,8 @@ namespace defaultimplementation {
struct TickingThreadTest : public CppUnit::TestFixture
{
- void setUp() {}
- void tearDown() {}
+ void setUp() override {}
+ void tearDown() override {}
void testTicksBeforeWaitBasic();
void testTicksBeforeWaitLiveUpdate();
@@ -62,7 +62,7 @@ struct MyApp : public TickingThread {
void start(ThreadPool& p) { _threadPool->start(p); }
- virtual ThreadWaitInfo doCriticalTick(ThreadIndex index) {
+ virtual ThreadWaitInfo doCriticalTick(ThreadIndex index) override {
assert(index < _context.size());
Context& c(_context[index]);
if (_doCritOverlapTest) {
@@ -74,7 +74,7 @@ struct MyApp : public TickingThread {
++c._critTickCount;
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex index) {
+ virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex index) override {
assert(index < _context.size());
Context& c(_context[index]);
++c._nonCritTickCount;
@@ -314,7 +314,7 @@ struct BroadcastApp : public TickingThread {
void start(ThreadPool& p) { _threadPool->start(p); }
- virtual ThreadWaitInfo doCriticalTick(ThreadIndex) {
+ virtual ThreadWaitInfo doCriticalTick(ThreadIndex) override {
if (!_queue.empty()) {
for (uint32_t i=0; i<_queue.size(); ++i) {
printTaskInfo(_queue[i], "activating");
@@ -325,7 +325,7 @@ struct BroadcastApp : public TickingThread {
}
return ThreadWaitInfo::NO_MORE_CRITICAL_WORK_KNOWN;
}
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) {
+ virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) override {
if (!_active.empty()) {
for (uint32_t i=0; i<_active.size(); ++i) {
printTaskInfo(_queue[i], "processing");