summaryrefslogtreecommitdiff
path: root/helpcompiler
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-01 14:37:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-02 07:12:46 +0000
commita7369d98991eb41e0e6bb008ef0305c17859540e (patch)
tree8bc87665d071392677446332725de3b6004d1530 /helpcompiler
parent5d39c2013374727b1c8f147b8b99d54402a7ff02 (diff)
loplugin:oncevar in helpcompiler..reportdesign
Change-Id: I2dc57931fb230953c285aeb18f57c0a41fedafcb Reviewed-on: https://gerrit.libreoffice.org/30463 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'helpcompiler')
-rw-r--r--helpcompiler/source/HelpSearch.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/helpcompiler/source/HelpSearch.cxx b/helpcompiler/source/HelpSearch.cxx
index 96f121932240..6f0fa2eeaf6a 100644
--- a/helpcompiler/source/HelpSearch.cxx
+++ b/helpcompiler/source/HelpSearch.cxx
@@ -26,9 +26,7 @@ void HelpSearch::query(OUString const &queryStr, bool captionOnly,
lucene::index::IndexReader *reader = lucene::index::IndexReader::open(d_indexDir.getStr());
lucene::search::IndexSearcher searcher(reader);
- TCHAR captionField[] = L"caption";
- TCHAR contentField[] = L"content";
- TCHAR *field = captionOnly ? captionField : contentField;
+ const TCHAR* field = captionOnly ? L"caption" : L"content";
bool isWildcard = queryStr[queryStr.getLength() - 1] == L'*';
std::vector<TCHAR> aQueryStr(OUStringToTCHARVec(queryStr));