diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-03 17:22:27 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-04 16:36:17 +0200 |
commit | d57ddaefd37e6a19d3a6937fbf9a655dbafcdba5 (patch) | |
tree | 56f50116805e8ae7d2287c934e6ccc073142d0ce /vespalib/src/tests/atomic | |
parent | 3dab091fd0ec3ffd71af3e19e55ed3a4437b8d8b (diff) |
Use override
Diffstat (limited to 'vespalib/src/tests/atomic')
-rw-r--r-- | vespalib/src/tests/atomic/atomic_bench.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vespalib/src/tests/atomic/atomic_bench.cpp b/vespalib/src/tests/atomic/atomic_bench.cpp index 499af1daa65..003ef25ba45 100644 --- a/vespalib/src/tests/atomic/atomic_bench.cpp +++ b/vespalib/src/tests/atomic/atomic_bench.cpp @@ -1,20 +1,20 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> -#include <vespa/log/log.h> -LOG_SETUP("atomic_bench"); + #include <vespa/vespalib/testkit/testapp.h> #include <vespa/vespalib/util/atomic.h> #include <vector> #include <algorithm> #include <sstream> +#include <vespa/log/log.h> +LOG_SETUP("atomic_bench"); class Test : public vespalib::TestApp { public: template<typename C, typename T> void testInc(size_t threads, size_t loops); - int Main(); + int Main() override; }; template <typename T> @@ -33,7 +33,7 @@ class Incrementer : public Changer<T> { public: Incrementer(int times, T *data) : Changer<T>(times, data) {} - void Run(FastOS_ThreadInterface *, void *) { + void Run(FastOS_ThreadInterface *, void *) override { using vespalib::Atomic; for (int i = 0; i < this->_times; ++i) { Atomic::postInc(this->_idata); @@ -46,7 +46,7 @@ class IncrementerByCmpSwap : public Changer<T> { public: IncrementerByCmpSwap(int times, T *data) : Changer<T>(times, data) {} - void Run(FastOS_ThreadInterface *, void *) { + void Run(FastOS_ThreadInterface *, void *) override { using vespalib::Atomic; T oldVal(0); for (int i = 0; i < this->_times; ++i) { |