summaryrefslogtreecommitdiffstats
path: root/storageframework
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:42:01 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:42:01 +0200
commit29b7b904fc467ee13b01a850f46372049eedf0cd (patch)
tree868c58155afab9f18eefde8062e328426b4c647e /storageframework
parent0f646f10b377b90fc37e9911f9fe383d112ff157 (diff)
Fix warnings hidden earlier due to including application headers as system includes
Diffstat (limited to 'storageframework')
-rw-r--r--storageframework/src/vespa/storageframework/defaultimplementation/component/CMakeLists.txt1
-rw-r--r--storageframework/src/vespa/storageframework/defaultimplementation/component/testcomponentregister.h37
-rw-r--r--storageframework/src/vespa/storageframework/generic/clock/clock.h3
-rw-r--r--storageframework/src/vespa/storageframework/generic/clock/time.h7
-rw-r--r--storageframework/src/vespa/storageframework/generic/thread/taskthread.h4
5 files changed, 12 insertions, 40 deletions
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/component/CMakeLists.txt b/storageframework/src/vespa/storageframework/defaultimplementation/component/CMakeLists.txt
index 68e3fec2fca..b4e0d1ae99e 100644
--- a/storageframework/src/vespa/storageframework/defaultimplementation/component/CMakeLists.txt
+++ b/storageframework/src/vespa/storageframework/defaultimplementation/component/CMakeLists.txt
@@ -2,5 +2,6 @@
vespa_add_library(storageframework_componentimpl OBJECT
SOURCES
componentregisterimpl.cpp
+ testcomponentregister.cpp
DEPENDS
)
diff --git a/storageframework/src/vespa/storageframework/defaultimplementation/component/testcomponentregister.h b/storageframework/src/vespa/storageframework/defaultimplementation/component/testcomponentregister.h
index 4b6b4e47269..a6766c4faf1 100644
--- a/storageframework/src/vespa/storageframework/defaultimplementation/component/testcomponentregister.h
+++ b/storageframework/src/vespa/storageframework/defaultimplementation/component/testcomponentregister.h
@@ -13,14 +13,12 @@
*/
#pragma once
-#include <vespa/storageframework/defaultimplementation/clock/fakeclock.h>
-#include <vespa/storageframework/defaultimplementation/component/componentregisterimpl.h>
+#include "componentregisterimpl.h"
#include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h>
#include <vespa/storageframework/defaultimplementation/memory/nomemorymanager.h>
+#include <vespa/storageframework/defaultimplementation/clock/fakeclock.h>
-namespace storage {
-namespace framework {
-namespace defaultimplementation {
+namespace storage::framework::defaultimplementation {
class TestComponentRegister {
ComponentRegisterImpl::UP _compReg;
@@ -29,28 +27,8 @@ class TestComponentRegister {
NoMemoryManager _memoryManager;
public:
- TestComponentRegister(ComponentRegisterImpl::UP compReg)
- : _compReg(std::move(compReg)),
- _clock(),
- _threadPool(_clock),
- _memoryManager()
- {
- assert(_compReg.get() != 0);
- // Set a memory manager, so users can register memory types and
- // ask for memory.
- _compReg->setMemoryManager(_memoryManager);
- // Set a fake clock, giving test control of clock
- _compReg->setClock(_clock);
- // Set a thread pool so components can make threads in tests.
- _compReg->setThreadPool(_threadPool);
- // Metric manager should not be needed. Tests of metric system can
- // be done without using this class. Components can still register
- // metrics without a manager.
-
- // Status page server should not be needed. Tests of status parts
- // can be done without using this class. Components can still
- // register status pages without a server
- }
+ TestComponentRegister(ComponentRegisterImpl::UP compReg);
+ ~TestComponentRegister();
ComponentRegisterImpl& getComponentRegister() { return *_compReg; }
FakeClock& getClock() { return _clock; }
@@ -59,7 +37,4 @@ public:
NoMemoryManager& getMemoryManager() { return _memoryManager; }
};
-} // defaultimplementation
-} // framework
-} // storage
-
+}
diff --git a/storageframework/src/vespa/storageframework/generic/clock/clock.h b/storageframework/src/vespa/storageframework/generic/clock/clock.h
index acc7a537418..c7fd02385ed 100644
--- a/storageframework/src/vespa/storageframework/generic/clock/clock.h
+++ b/storageframework/src/vespa/storageframework/generic/clock/clock.h
@@ -13,9 +13,8 @@
#pragma once
-#include <vespa/storageframework/generic/clock/time.h>
+#include "time.h"
#include <memory>
-#include <chrono>
namespace storage {
namespace framework {
diff --git a/storageframework/src/vespa/storageframework/generic/clock/time.h b/storageframework/src/vespa/storageframework/generic/clock/time.h
index 969c5c20389..14dfa461dd2 100644
--- a/storageframework/src/vespa/storageframework/generic/clock/time.h
+++ b/storageframework/src/vespa/storageframework/generic/clock/time.h
@@ -9,8 +9,7 @@ namespace vespalib {
class asciistream;
}
-namespace storage {
-namespace framework {
+namespace storage::framework {
using MonotonicTimePoint = std::chrono::steady_clock::time_point;
using MonotonicDuration = std::chrono::steady_clock::duration;
@@ -171,6 +170,4 @@ inline MicroSecTime MilliSecTime::getMicros() const {
return MicroSecTime(getTime() * 1000);
}
-} // framework
-} // storage
-
+}
diff --git a/storageframework/src/vespa/storageframework/generic/thread/taskthread.h b/storageframework/src/vespa/storageframework/generic/thread/taskthread.h
index 39456d0f56a..5daebd2c6b3 100644
--- a/storageframework/src/vespa/storageframework/generic/thread/taskthread.h
+++ b/storageframework/src/vespa/storageframework/generic/thread/taskthread.h
@@ -30,14 +30,14 @@ public:
TaskThread(ThreadLock& lock);
void addTask(const Task& t);
- virtual ThreadWaitInfo doCriticalTick(ThreadIndex);
+ ThreadWaitInfo doCriticalTick(ThreadIndex) override;
bool empty() const { return _tasks.empty(); }
const Task& peek() const { return _tasks.top(); }
void pop() { _tasks.pop(); }
private:
- virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) = 0;
+ virtual ThreadWaitInfo doNonCriticalTick(ThreadIndex) override = 0;
};
template <typename Task>