diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-12-08 12:07:49 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-12-08 12:12:53 +0100 |
commit | 4c4999d944bbf8a34f8a320b8de6f4a325bd5d97 (patch) | |
tree | 346d254695a1650724cb0492ef2bbced17b35afc /helpcompiler/source/HelpLinker.cxx | |
parent | de7018f755af0b2372c0e261f53d57de6cf77c38 (diff) |
tdf#96042: 'std::string::find("something") == 0' means "startsWith()".
This should fix a regression from 3bdd176731c351638f541a37b94094124f3c9f52,
apparently the cppcheck's advice is misleading.
Change-Id: I427ecaa1eb3c9841cb6112997b9b51feda4583d0
Diffstat (limited to 'helpcompiler/source/HelpLinker.cxx')
-rw-r--r-- | helpcompiler/source/HelpLinker.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx index fb7425e3dd03..73ba6a3a2919 100644 --- a/helpcompiler/source/HelpLinker.cxx +++ b/helpcompiler/source/HelpLinker.cxx @@ -396,7 +396,7 @@ void HelpLinker::link() throw(HelpProcessingException, BasicCodeTagger::TaggerEx continue; std::string documentPath = streamTable.document_path; - if (documentPath.compare("/") == 0) + if (documentPath.compare(0, 1, "/") == 0) documentPath = documentPath.substr(1); std::string documentJarfile = streamTable.document_module + ".jar"; |