summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@oath.com>2018-08-29 00:34:08 +0200
committerHenning Baldersheim <balder@oath.com>2018-08-29 00:34:08 +0200
commit72300dc30237f4f10432652e4e9da45a5563db30 (patch)
tree293cc0148bf84656d19190450d08fa9a264b73a0 /searchlib
parent9ae2e92efcfa3a95a6bd988dc7e34d7c84350289 (diff)
Expose constness in interface to avoid cheating.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attribute_operation.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_operation.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_operation.cpp
index 24e130df143..56109aa059b 100644
--- a/searchlib/src/vespa/searchlib/attribute/attribute_operation.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attribute_operation.cpp
@@ -107,8 +107,8 @@ public:
_result(std::move(result))
{}
- void operator()(const IAttributeVector &attributeVector) override {
- OP op(const_cast<IAttributeVector &>(attributeVector), _operand);
+ void operator()(IAttributeVector &attributeVector) override {
+ OP op(attributeVector, _operand);
if (op.valid()) {
const RankedHit *hits = &_result.second[0];
size_t numHits = _result.second.size();
@@ -132,8 +132,8 @@ public:
_reRanked(std::move(reRanked))
{}
- void operator()(const IAttributeVector &attributeVector) override {
- OP op(const_cast<IAttributeVector &>(attributeVector), _operand);
+ void operator()(IAttributeVector &attributeVector) override {
+ OP op(attributeVector, _operand);
if (op.valid()) {
std::for_each(_reRanked.begin(), _reRanked.end(), [&op](Hit hit) { op(hit.first); });
}
@@ -151,8 +151,8 @@ public:
_docIds(std::move(docIds))
{}
- void operator()(const IAttributeVector &attributeVector) override {
- OP op(const_cast<IAttributeVector &>(attributeVector), _operand);
+ void operator()(IAttributeVector &attributeVector) override {
+ OP op(attributeVector, _operand);
if (op.valid()) {
std::for_each(_docIds.begin(), _docIds.end(), [&op](uint32_t docId) { op(docId); });
}