aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/tests/objectselection/objectselection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'staging_vespalib/src/tests/objectselection/objectselection.cpp')
-rw-r--r--staging_vespalib/src/tests/objectselection/objectselection.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/staging_vespalib/src/tests/objectselection/objectselection.cpp b/staging_vespalib/src/tests/objectselection/objectselection.cpp
index db696230082..27ecb068231 100644
--- a/staging_vespalib/src/tests/objectselection/objectselection.cpp
+++ b/staging_vespalib/src/tests/objectselection/objectselection.cpp
@@ -1,5 +1,5 @@
// 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/vespalib/testkit/testapp.h>
#include <vespa/vespalib/objects/identifiable.hpp>
#include <vespa/vespalib/objects/objectpredicate.h>
@@ -17,7 +17,7 @@ struct Foo : public Identifiable
DECLARE_IDENTIFIABLE(Foo);
virtual Foo *clone() const { return new Foo(*this); }
- void selectMembers(const ObjectPredicate &p, ObjectOperation &o) override {
+ virtual void selectMembers(const ObjectPredicate &p, ObjectOperation &o) override {
for (uint32_t i = 0; i < nodes.size(); ++i) {
nodes[i]->select(p, o);
}
@@ -32,7 +32,7 @@ struct Bar : public Foo
DECLARE_IDENTIFIABLE(Bar);
Bar() : value(0) {}
Bar(int v) { value = v; }
- Bar *clone() const override { return new Bar(*this); }
+ virtual Bar *clone() const override { return new Bar(*this); }
};
IMPLEMENT_IDENTIFIABLE(Bar, Identifiable);
@@ -40,7 +40,7 @@ struct ObjectType : public ObjectPredicate
{
uint32_t cid;
ObjectType(uint32_t id) : cid(id) {}
- bool check(const Identifiable &obj) const override {
+ virtual bool check(const Identifiable &obj) const override {
return (obj.getClass().id() == cid);
}
};
@@ -48,7 +48,7 @@ struct ObjectType : public ObjectPredicate
struct ObjectCollect : public ObjectOperation
{
std::vector<Identifiable*> nodes;
- void execute(Identifiable &obj) override {
+ virtual void execute(Identifiable &obj) override {
nodes.push_back(&obj);
}
};