summaryrefslogtreecommitdiff
path: root/helpcompiler
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-29 23:33:49 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-30 08:32:26 +0100
commitba2ef4a37f7e182fa6cecbfc9c47937c8e56e639 (patch)
tree7c46987fccde75353c1e61a7824882bf41528416 /helpcompiler
parentcd8616e003071def411d3e54d942d273038422ed (diff)
Avoid -Werror,-Wdeprecated-enum-enum-conversion
...with recent Clang 10 trunk: > helpcompiler/source/HelpIndexer.cxx:119:71: error: bitwise operation between different enumeration types ('lucene::document::Field::Store' and 'lucene::document::Field::Index') is deprecated [-Werror,-Wdeprecated-enum-enum-conversion] > doc->add(*_CLNEW Field(_T("path"), aPath.data(), Field::STORE_YES | Field::INDEX_UNTOKENIZED)); > ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~ where the Field constructor in workdir/UnpackedTarball/clucene/src/core/CLucene/document/Field.h has an "int _config" parameter that is apparently intended to take a mix of Store (bit values 1, 2, 4) and Index (bit values 16, 32, 64, 128) flags. Change-Id: Ie080e44bf820cb776bc61ac22cf73f5437d8c5dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85972 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'helpcompiler')
-rw-r--r--helpcompiler/source/HelpIndexer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index 198824d3b92f..dca372ea3700 100644
--- a/helpcompiler/source/HelpIndexer.cxx
+++ b/helpcompiler/source/HelpIndexer.cxx
@@ -116,7 +116,7 @@ void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) const {
OUString path = "#HLP#" + d_module + "/" + fileName;
std::vector<TCHAR> aPath(OUStringToTCHARVec(path));
- doc->add(*_CLNEW Field(_T("path"), aPath.data(), Field::STORE_YES | Field::INDEX_UNTOKENIZED));
+ doc->add(*_CLNEW Field(_T("path"), aPath.data(), int(Field::STORE_YES) | int(Field::INDEX_UNTOKENIZED)));
OUString sEscapedFileName =
rtl::Uri::encode(fileName,
@@ -124,11 +124,11 @@ void HelpIndexer::helpDocument(OUString const & fileName, Document *doc) const {
// Add the caption as a field.
OUString captionPath = d_captionDir + "/" + sEscapedFileName;
- doc->add(*_CLNEW Field(_T("caption"), helpFileReader(captionPath), Field::STORE_NO | Field::INDEX_TOKENIZED));
+ doc->add(*_CLNEW Field(_T("caption"), helpFileReader(captionPath), int(Field::STORE_NO) | int(Field::INDEX_TOKENIZED)));
// Add the content as a field.
OUString contentPath = d_contentDir + "/" + sEscapedFileName;
- doc->add(*_CLNEW Field(_T("content"), helpFileReader(contentPath), Field::STORE_NO | Field::INDEX_TOKENIZED));
+ doc->add(*_CLNEW Field(_T("content"), helpFileReader(contentPath), int(Field::STORE_NO) | int(Field::INDEX_TOKENIZED)));
}
lucene::util::Reader *HelpIndexer::helpFileReader(OUString const & path) {