summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-21 05:01:45 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-21 05:01:45 +0000
commit2b51ff0dfcee66b2ed67ef3ce53eb3ef769cb585 (patch)
treee8f50c53751966585cd4490c722277179a5693da /searchlib
parent9dd38b4d1f01fded878ef6b5488e48cccc5f4acd (diff)
Deinline some non-trivial methods and do not provide assert.h in string.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/diskindex/docidmapper.h44
-rw-r--r--searchlib/src/vespa/searchlib/fef/properties.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/query/tree/term.h1
3 files changed, 16 insertions, 32 deletions
diff --git a/searchlib/src/vespa/searchlib/diskindex/docidmapper.h b/searchlib/src/vespa/searchlib/diskindex/docidmapper.h
index f150e8636a5..018fe35fb3a 100644
--- a/searchlib/src/vespa/searchlib/diskindex/docidmapper.h
+++ b/searchlib/src/vespa/searchlib/diskindex/docidmapper.h
@@ -3,14 +3,13 @@
#include <vespa/vespalib/util/array.h>
#include <vespa/vespalib/stllike/string.h>
+#include <cassert>
-namespace search
-{
+namespace search {
class BitVector;
-namespace diskindex
-{
+namespace diskindex {
typedef vespalib::Array<uint8_t> SelectorArray;
@@ -21,21 +20,11 @@ public:
const SelectorArray *_selector; // External ownership
uint8_t _selectorId;
- DocIdMapping(void);
-
- void
- clear(void);
-
- void
- setup(uint32_t docIdLimit);
-
- void
- setup(uint32_t docIdLimit,
- const SelectorArray *selector,
- uint8_t selectorId);
-
- bool
- readDocIdLimit(const vespalib::string &dir);
+ DocIdMapping();
+ void clear();
+ void setup(uint32_t docIdLimit);
+ void setup(uint32_t docIdLimit, const SelectorArray *selector, uint8_t selectorId);
+ bool readDocIdLimit(const vespalib::string &dir);
};
@@ -47,17 +36,14 @@ public:
uint32_t _selectorLimit; // Limit on output
uint8_t _selectorId;
- DocIdMapper(void)
+ DocIdMapper()
: _selector(NULL),
_docIdLimit(0u),
_selectorLimit(0),
_selectorId(0u)
- {
- }
+ { }
- void
- setup(const DocIdMapping &mapping)
- {
+ void setup(const DocIdMapping &mapping) {
_selector = (mapping._selector != NULL) ?
&((*mapping._selector)[0]) : NULL;
_docIdLimit = mapping._docIdLimit;
@@ -67,15 +53,11 @@ public:
_selectorId = mapping._selectorId;
}
- static uint32_t
- noDocId(void)
- {
+ static uint32_t noDocId() {
return static_cast<uint32_t>(-1);
}
- uint32_t
- mapDocId(uint32_t docId) const
- {
+ uint32_t mapDocId(uint32_t docId) const {
assert(docId < _docIdLimit);
if (_selector != NULL &&
(docId >= _selectorLimit || _selector[docId] != _selectorId)) {
diff --git a/searchlib/src/vespa/searchlib/fef/properties.cpp b/searchlib/src/vespa/searchlib/fef/properties.cpp
index b501a445d91..a419eda0303 100644
--- a/searchlib/src/vespa/searchlib/fef/properties.cpp
+++ b/searchlib/src/vespa/searchlib/fef/properties.cpp
@@ -3,6 +3,7 @@
#include "properties.h"
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/vespalib/stllike/hash_map_equal.hpp>
+#include <cassert>
namespace search {
namespace fef {
@@ -265,4 +266,4 @@ void Properties::swap(Properties & rhs)
} // namespace fef
} // namespace search
-VESPALIB_HASH_MAP_INSTANTIATE(vespalib::string, search::fef::Property::Values); \ No newline at end of file
+VESPALIB_HASH_MAP_INSTANTIATE(vespalib::string, search::fef::Property::Values);
diff --git a/searchlib/src/vespa/searchlib/query/tree/term.h b/searchlib/src/vespa/searchlib/query/tree/term.h
index c13a586dd01..baa6656f66c 100644
--- a/searchlib/src/vespa/searchlib/query/tree/term.h
+++ b/searchlib/src/vespa/searchlib/query/tree/term.h
@@ -4,6 +4,7 @@
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchlib/query/tree/node.h>
#include <vespa/searchlib/query/weight.h>
+#include <cassert>
namespace search {
namespace query {