WaE: keep windows compiler cast happy

This commit is contained in:
Caolán McNamara 2011-06-16 14:54:35 +01:00
parent 406d409962
commit 5b1fbb58d4
3 changed files with 11 additions and 6 deletions

View file

@ -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;

View file

@ -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: */

View file

@ -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) );
}
}