summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2019-11-11 19:11:11 +0000
committerHenning Baldersheim <balder@oath.com>2019-11-12 10:42:50 +0000
commit016312d2f5d01681ec888167d7ffb1c02becfc38 (patch)
tree223f2556685139084f3e5fc0614aab690c71d40a /document
parentcc28cb962fb5b5e7cf209a10ebd684cc9aa59087 (diff)
= default
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/select/compare.cpp25
-rw-r--r--document/src/vespa/document/select/resultlist.cpp10
2 files changed, 15 insertions, 20 deletions
diff --git a/document/src/vespa/document/select/compare.cpp b/document/src/vespa/document/select/compare.cpp
index 1c6b2a9da14..7db40929a64 100644
--- a/document/src/vespa/document/select/compare.cpp
+++ b/document/src/vespa/document/select/compare.cpp
@@ -9,8 +9,7 @@
#include <vespa/document/util/stringutil.h>
#include <ostream>
-namespace document {
-namespace select {
+namespace document::select {
Compare::Compare(std::unique_ptr<ValueNode> left,
const Operator& op,
@@ -24,11 +23,10 @@ Compare::Compare(std::unique_ptr<ValueNode> left,
{
}
-Compare::~Compare()
-{
-}
+Compare::~Compare() = default;
-Node::UP Compare::clone() const
+Node::UP
+Compare::clone() const
{
return wrapParens(new Compare(_left->clone(),
_operator,
@@ -53,10 +51,8 @@ namespace {
&& (op == FunctionOperator::EQ || op == FunctionOperator::NE
|| op == GlobOperator::GLOB))
{
- document::BucketId b(
- static_cast<IntegerValue&>(bVal).getValue());
- document::BucketId s(
- static_cast<IntegerValue&>(nVal).getValue());
+ document::BucketId b( static_cast<IntegerValue&>(bVal).getValue());
+ document::BucketId s( static_cast<IntegerValue&>(nVal).getValue());
ResultList resultList(Result::get(s.contains(b)));
@@ -120,12 +116,14 @@ namespace {
}
}
-ResultList Compare::contains(const Context& context) const
+ResultList
+Compare::contains(const Context& context) const
{
return containsValue<Context>(context, *_left, *_right, _operator);
}
-ResultList Compare::trace(const Context& context, std::ostream& out) const
+ResultList
+Compare::trace(const Context& context, std::ostream& out) const
{
return traceValue(context, *_left, *_right, _operator, out);
}
@@ -150,5 +148,4 @@ Compare::print(std::ostream& out, bool verbose, const std::string& indent) const
if (_parentheses) out << ')';
}
-} // select
-} // document
+}
diff --git a/document/src/vespa/document/select/resultlist.cpp b/document/src/vespa/document/select/resultlist.cpp
index c69f7a5d5f8..5f780436b2f 100644
--- a/document/src/vespa/document/select/resultlist.cpp
+++ b/document/src/vespa/document/select/resultlist.cpp
@@ -3,12 +3,11 @@
#include "resultlist.h"
#include <ostream>
-namespace document {
-namespace select {
+namespace document::select {
-ResultList::ResultList() : _results() { }
+ResultList::ResultList() = default;
-ResultList::~ResultList() { }
+ResultList::~ResultList() = default;
ResultList::ResultList(const Result& result) {
add(VariableMap(), result);
@@ -147,5 +146,4 @@ bool ResultList::operator==(const ResultList& other) const {
return (combineResultsLocal(_results) == combineResultsLocal(other._results));
}
-} // select
-} // document
+}