summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-04-15 12:13:43 +0200
committerTor Egge <Tor.Egge@broadpark.no>2019-04-15 12:13:43 +0200
commit1de0111e43b4bc690232f23cb36be666a806819d (patch)
tree083860638f3b8039f60ccefc9ac333349deea9a7 /searchlib
parent70b88d986f9993a336d243ea8233416defa3d0e3 (diff)
Style fixes.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/index/bitvectorkeys.h3
-rw-r--r--searchlib/src/vespa/searchlib/index/dictionaryfile.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/index/docbuilder.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/index/docbuilder.h2
-rw-r--r--searchlib/src/vespa/searchlib/index/postinglistfile.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/index/postinglisthandle.h3
6 files changed, 7 insertions, 7 deletions
diff --git a/searchlib/src/vespa/searchlib/index/bitvectorkeys.h b/searchlib/src/vespa/searchlib/index/bitvectorkeys.h
index 895f485e260..3bae94ba554 100644
--- a/searchlib/src/vespa/searchlib/index/bitvectorkeys.h
+++ b/searchlib/src/vespa/searchlib/index/bitvectorkeys.h
@@ -4,8 +4,7 @@
namespace search::index {
-class BitVectorWordSingleKey {
-public:
+struct BitVectorWordSingleKey {
uint64_t _wordNum;
uint32_t _numDocs;
uint32_t _pad;
diff --git a/searchlib/src/vespa/searchlib/index/dictionaryfile.cpp b/searchlib/src/vespa/searchlib/index/dictionaryfile.cpp
index abb8434440e..df2f81d6d1a 100644
--- a/searchlib/src/vespa/searchlib/index/dictionaryfile.cpp
+++ b/searchlib/src/vespa/searchlib/index/dictionaryfile.cpp
@@ -19,7 +19,7 @@ DictionaryFileRandRead::~DictionaryFileRandRead() = default;
void
DictionaryFileRandRead::afterOpen(FastOS_FileInterface &file)
{
- _memoryMapped = file.MemoryMapPtr(0) != nullptr;
+ _memoryMapped = (file.MemoryMapPtr(0) != nullptr);
}
}
diff --git a/searchlib/src/vespa/searchlib/index/docbuilder.cpp b/searchlib/src/vespa/searchlib/index/docbuilder.cpp
index 6c2050d08cd..f3d76fc815d 100644
--- a/searchlib/src/vespa/searchlib/index/docbuilder.cpp
+++ b/searchlib/src/vespa/searchlib/index/docbuilder.cpp
@@ -203,7 +203,7 @@ DocBuilder::CollectionFieldHandle::endElement()
} else {
throw Error(vespalib::make_string("Field '%s' not compatible", _sfield.getName().c_str()));
}
- _element.reset(nullptr);
+ _element.reset();
}
DocBuilder::IndexFieldHandle::IndexFieldHandle(const FixedTypeRepo & repo, const document::Field & dfield, const Schema::Field & sfield)
diff --git a/searchlib/src/vespa/searchlib/index/docbuilder.h b/searchlib/src/vespa/searchlib/index/docbuilder.h
index 729ec963927..3aaeb26146b 100644
--- a/searchlib/src/vespa/searchlib/index/docbuilder.h
+++ b/searchlib/src/vespa/searchlib/index/docbuilder.h
@@ -245,7 +245,7 @@ private:
void endField() {
_fieldHandle->onEndField();
_doc->setValue(_type->getField(_fieldHandle->getField().getName()), *_fieldHandle->getValue());
- _fieldHandle.reset(static_cast<FieldHandle *>(nullptr));
+ _fieldHandle.reset();
}
void endDocument(const document::Document::UP & doc) {
(void) doc;
diff --git a/searchlib/src/vespa/searchlib/index/postinglistfile.cpp b/searchlib/src/vespa/searchlib/index/postinglistfile.cpp
index a9dee8282ed..3dda52a9871 100644
--- a/searchlib/src/vespa/searchlib/index/postinglistfile.cpp
+++ b/searchlib/src/vespa/searchlib/index/postinglistfile.cpp
@@ -84,7 +84,7 @@ PostingListFileRandRead::~PostingListFileRandRead()
void
PostingListFileRandRead::afterOpen(FastOS_FileInterface &file)
{
- _memoryMapped = file.MemoryMapPtr(0) != nullptr;
+ _memoryMapped = (file.MemoryMapPtr(0) != nullptr);
}
PostingListFileRandReadPassThrough::
diff --git a/searchlib/src/vespa/searchlib/index/postinglisthandle.h b/searchlib/src/vespa/searchlib/index/postinglisthandle.h
index 0454687d961..8eb42dc91fe 100644
--- a/searchlib/src/vespa/searchlib/index/postinglisthandle.h
+++ b/searchlib/src/vespa/searchlib/index/postinglisthandle.h
@@ -47,8 +47,9 @@ public:
~PostingListHandle()
{
- if (_allocMem != nullptr)
+ if (_allocMem != nullptr) {
free(_allocMem);
+ }
}
/**