summaryrefslogtreecommitdiffstats
path: root/searchsummary
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-01 16:54:15 +0200
committerGitHub <noreply@github.com>2017-06-01 16:54:15 +0200
commit1026c45714c0c3df53b0c3a660cda7c4a04a22cd (patch)
tree4253e5e7c230dd7bd8c668ebdab284ed9eab72e9 /searchsummary
parenta7509e77c7fc62d73c96da7e09490523dab8a133 (diff)
parentced603ba9349f3591e0382dd2c6b88ac14cc3d2a (diff)
Merge pull request #2600 from yahoo/balder/remove-fastos.h-from-searchlib
Balder/remove fastos.h from searchlib
Diffstat (limited to 'searchsummary')
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp7
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp22
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.h26
-rw-r--r--searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp2
4 files changed, 29 insertions, 28 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp
index f964eafb2c9..baa2afb4631 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumformat.cpp
@@ -1,9 +1,9 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "docsumformat.h"
+#include <cassert>
-namespace search {
-namespace docsummary {
+namespace search::docsummary {
size_t
DocsumFormat::addByte(search::RawBuf &target, uint8_t value)
@@ -98,5 +98,4 @@ DocsumFormat::addEmpty(ResType type, search::RawBuf &target)
return 0;
}
-} // namespace docsummary
-} // namespace search
+}
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp b/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp
index 5b38a00fa3b..4b7e3c49cf5 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.cpp
@@ -41,6 +41,28 @@ KeywordExtractor::~KeywordExtractor()
}
}
+KeywordExtractor::IndexPrefix::IndexPrefix(const char *prefix, IndexPrefix **list)
+ : _prefix(NULL),
+ _prefixLen(0),
+ _next(NULL)
+{
+ _prefix = strdup(prefix);
+ assert(_prefix != NULL);
+ _prefixLen = strlen(prefix);
+ _next = *list;
+ *list = this;
+}
+
+KeywordExtractor::IndexPrefix::~IndexPrefix()
+{
+ free(_prefix);
+}
+
+bool
+KeywordExtractor::IndexPrefix::Match(const char *idxName) const
+{
+ return (strncmp(idxName, _prefix, _prefixLen) == 0);
+}
void
KeywordExtractor::AddLegalIndexSpec(const char *spec)
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.h b/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.h
index a276b5bf38a..5ee598d98d9 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.h
+++ b/searchsummary/src/vespa/searchsummary/docsummary/keywordextractor.h
@@ -31,29 +31,9 @@ public:
int _prefixLen;
IndexPrefix *_next;
-
- IndexPrefix(const char *prefix,
- IndexPrefix **list)
- : _prefix(NULL),
- _prefixLen(0),
- _next(NULL)
- {
- _prefix = strdup(prefix);
- assert(_prefix != NULL);
- _prefixLen = strlen(prefix);
- _next = *list;
- *list = this;
- }
-
- ~IndexPrefix()
- {
- free(_prefix);
- }
-
- bool Match(const char *idxName) const
- {
- return (strncmp(idxName, _prefix, _prefixLen) == 0);
- }
+ IndexPrefix(const char *prefix, IndexPrefix **list);
+ ~IndexPrefix();
+ bool Match(const char *idxName) const;
};
private:
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp
index 9c28861eee6..ba63d2cd6a1 100644
--- a/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp
+++ b/searchsummary/src/vespa/searchsummary/docsummary/resultclass.cpp
@@ -1,8 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
#include "resultclass.h"
#include "resultconfig.h"
+#include <cassert>
#include <zlib.h>
namespace search {