summaryrefslogtreecommitdiff
path: root/helpcompiler/source
diff options
context:
space:
mode:
Diffstat (limited to 'helpcompiler/source')
-rw-r--r--helpcompiler/source/HelpCompiler.cxx4
-rw-r--r--helpcompiler/source/HelpLinker.cxx19
2 files changed, 11 insertions, 12 deletions
diff --git a/helpcompiler/source/HelpCompiler.cxx b/helpcompiler/source/HelpCompiler.cxx
index c25b69bc1933..91458e09e057 100644
--- a/helpcompiler/source/HelpCompiler.cxx
+++ b/helpcompiler/source/HelpCompiler.cxx
@@ -460,9 +460,9 @@ bool HelpCompiler::compile()
std::string title;
// returns a clone of the document with switch-cases resolved
std::string appl = module.substr(1);
- for (size_t i = 0; i < appl.length(); ++i)
+ for (char & i : appl)
{
- appl[i]=toupper(appl[i]);
+ i=toupper(i);
}
xmlNodePtr docResolved = clone(xmlDocGetRootElement(docResolvedOrg), appl);
myparser aparser(documentId, fileName, title);
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 95821f172a4b..dcf195b77d86 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -210,9 +210,8 @@ namespace URLEncoder
static const char hex[17] = "0123456789ABCDEF";
std::string result;
- for (size_t i=0; i < rIn.length(); ++i)
+ for (char c : rIn)
{
- unsigned char c = rIn[i];
if (isalnum (c) || strchr (good, c))
result += c;
else {
@@ -242,21 +241,21 @@ void HelpLinker::addBookmark( FILE* pFile_DBHelp, std::string thishid,
std::vector<unsigned char> dataB(dataLen);
size_t i = 0;
dataB[i++] = static_cast<unsigned char>(fileLen);
- for (size_t j = 0; j < fileB.length(); ++j)
- dataB[i++] = static_cast<unsigned char>(fileB[j]);
+ for (char j : fileB)
+ dataB[i++] = static_cast<unsigned char>(j);
if (!anchorB.empty())
{
dataB[i++] = '#';
- for (size_t j = 0; j < anchorB.length(); ++j)
- dataB[i++] = anchorB[j];
+ for (char j : anchorB)
+ dataB[i++] = j;
}
dataB[i++] = static_cast<unsigned char>(jarfileB.length());
- for (size_t j = 0; j < jarfileB.length(); ++j)
- dataB[i++] = jarfileB[j];
+ for (char j : jarfileB)
+ dataB[i++] = j;
dataB[i++] = static_cast<unsigned char>(titleB.length());
- for (size_t j = 0; j < titleB.length(); ++j)
- dataB[i++] = titleB[j];
+ for (char j : titleB)
+ dataB[i++] = j;
if( pFile_DBHelp != nullptr )
{