diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-06-16 14:54:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-06-16 14:54:35 +0100 |
commit | 5b1fbb58d4e23b85dbc70a78a00666632afc6e42 (patch) | |
tree | 940b29ae5998d9e09b0dbc5fac2a9fd6de92a175 /l10ntools | |
parent | 406d40996242c750b56cd84dd4c647d43648bfb5 (diff) |
WaE: keep windows compiler cast happy
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/help/HelpCompiler.cxx | 4 | ||||
-rw-r--r-- | l10ntools/source/help/HelpCompiler.hxx | 5 | ||||
-rw-r--r-- | l10ntools/source/help/HelpLinker.cxx | 8 |
3 files changed, 11 insertions, 6 deletions
diff --git a/l10ntools/source/help/HelpCompiler.cxx b/l10ntools/source/help/HelpCompiler.cxx index df2093931126..a3f2cd193a19 100644 --- a/l10ntools/source/help/HelpCompiler.cxx +++ b/l10ntools/source/help/HelpCompiler.cxx @@ -351,7 +351,7 @@ void myparser::traverse( xmlNodePtr parentNode ) embedded = std::string((const char*)embeddedxml); xmlFree (embeddedxml); std::transform (embedded.begin(), embedded.end(), - embedded.begin(), tolower); + embedded.begin(), tocharlower); } bool isEmbedded = !embedded.empty() && embedded.compare("true") == 0; @@ -437,7 +437,7 @@ bool HelpCompiler::compile( void ) throw( HelpProcessingException ) if (modulename[0] == 'S') { modulename = modulename.substr(1); - std::transform(modulename.begin(), modulename.end(), modulename.begin(), tolower); + std::transform(modulename.begin(), modulename.end(), modulename.begin(), tocharlower); } if (modulename != "DEFAULT" && modulename != module) continue; diff --git a/l10ntools/source/help/HelpCompiler.hxx b/l10ntools/source/help/HelpCompiler.hxx index 016f7eefb8bc..d40c72547203 100644 --- a/l10ntools/source/help/HelpCompiler.hxx +++ b/l10ntools/source/help/HelpCompiler.hxx @@ -322,6 +322,11 @@ private: bool bExtensionMode; }; +inline char tocharlower(char c) +{ + return static_cast<char>(tolower(c)); +} + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/l10ntools/source/help/HelpLinker.cxx b/l10ntools/source/help/HelpLinker.cxx index 81a96ce37899..b1d7c1c2e849 100644 --- a/l10ntools/source/help/HelpLinker.cxx +++ b/l10ntools/source/help/HelpLinker.cxx @@ -351,7 +351,7 @@ void HelpLinker::addBookmark( DB* dbBase, FILE* pFile_DBHelp, std::string thishi size_t i = 0; dataB[i++] = static_cast<unsigned char>(fileLen); for (size_t j = 0; j < fileB.length(); ++j) - dataB[i++] = fileB[j]; + dataB[i++] = static_cast<unsigned char>(fileB[j]); if (!anchorB.empty()) { dataB[i++] = '#'; @@ -386,7 +386,7 @@ void HelpLinker::initIndexerPreProcessor() if( m_pIndexerPreProcessor ) delete m_pIndexerPreProcessor; std::string mod = module; - std::transform (mod.begin(), mod.end(), mod.begin(), tolower); + std::transform (mod.begin(), mod.end(), mod.begin(), tocharlower); m_pIndexerPreProcessor = new IndexerPreProcessor( mod, indexDirParentName, idxCaptionStylesheet, idxContentStylesheet ); } @@ -413,7 +413,7 @@ void HelpLinker::link() throw( HelpProcessingException ) #endif std::string mod = module; - std::transform (mod.begin(), mod.end(), mod.begin(), tolower); + std::transform (mod.begin(), mod.end(), mod.begin(), tocharlower); // do the work here // continue with introduction of the overall process thing into the @@ -666,7 +666,7 @@ void HelpLinker::link() throw( HelpProcessingException ) if (document) { std::string temp = module; - std::transform (temp.begin(), temp.end(), temp.begin(), tolower); + std::transform (temp.begin(), temp.end(), temp.begin(), tocharlower); m_pIndexerPreProcessor->processDocument(document, URLEncoder::encode(documentPath) ); } } |