start to replace old C-style casts with static_cast or reinterpret_cast, avoid implicit casts

This commit is contained in:
wmayer
2019-09-16 17:59:18 +02:00
parent 0aaa43a303
commit 52916175ed
10 changed files with 136 additions and 245 deletions

View File

@@ -154,7 +154,7 @@ inline StrXUTF8::StrXUTF8(const XMLCh* const toTranscode)
while (inputLength)
{
outputLength = transcoder->transcodeTo(toTranscode + offset, inputLength, outBuff, 128, eaten, XMLTranscoder::UnRep_RepChar);
str.append((const char*)outBuff, outputLength);
str.append(reinterpret_cast<const char*>(outBuff), outputLength);
offset += eaten;
inputLength -= eaten;
@@ -258,7 +258,7 @@ inline XUTF8Str::XUTF8Str(const char* const fromTranscode)
}
static XMLCh outBuff[128];
XMLByte* xmlBytes = (XMLByte*)fromTranscode;
const XMLByte* xmlBytes = reinterpret_cast<const XMLByte*>(fromTranscode);
#if (XERCES_VERSION_MAJOR == 2)
unsigned int outputLength;
unsigned int eaten = 0;