summaryrefslogtreecommitdiff
path: root/helpcompiler
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-05-22 13:49:30 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-05-22 16:35:20 +0200
commitc18e2ea2a52fc171c50fcb22d431e94c6aececc5 (patch)
treea63721b18626947e5278a51feb7fd64604e80eee /helpcompiler
parent7cf4bcef41448218f76fa1e974f541e13dc03023 (diff)
New loplugin:data
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'helpcompiler')
-rw-r--r--helpcompiler/source/HelpIndexer.cxx2
-rw-r--r--helpcompiler/source/HelpSearch.cxx4
2 files changed, 3 insertions, 3 deletions
diff --git a/helpcompiler/source/HelpIndexer.cxx b/helpcompiler/source/HelpIndexer.cxx
index d2380c53d3d1..25ff6ef0b09e 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[0], Field::STORE_YES | Field::INDEX_UNTOKENIZED));
+ doc->add(*_CLNEW Field(_T("path"), aPath.data(), Field::STORE_YES | Field::INDEX_UNTOKENIZED));
OUString sEscapedFileName =
rtl::Uri::encode(fileName,
diff --git a/helpcompiler/source/HelpSearch.cxx b/helpcompiler/source/HelpSearch.cxx
index 6f0fa2eeaf6a..75a15bc4fcf0 100644
--- a/helpcompiler/source/HelpSearch.cxx
+++ b/helpcompiler/source/HelpSearch.cxx
@@ -32,9 +32,9 @@ void HelpSearch::query(OUString const &queryStr, bool captionOnly,
std::vector<TCHAR> aQueryStr(OUStringToTCHARVec(queryStr));
lucene::search::Query *pQuery;
if (isWildcard)
- pQuery = _CLNEW lucene::search::WildcardQuery(_CLNEW lucene::index::Term(field, &aQueryStr[0]));
+ pQuery = _CLNEW lucene::search::WildcardQuery(_CLNEW lucene::index::Term(field, aQueryStr.data()));
else
- pQuery = _CLNEW lucene::search::TermQuery(_CLNEW lucene::index::Term(field, &aQueryStr[0]));
+ pQuery = _CLNEW lucene::search::TermQuery(_CLNEW lucene::index::Term(field, aQueryStr.data()));
lucene::search::Hits *hits = searcher.search(pQuery);
for (size_t i = 0; i < hits->length(); ++i) {