Merge pull request #1860 from akortunov/warningfix

Do not use fall-through to avoid GCC warnings
remotes/1728160796594174844/tmp_0.7.0-alpha
Bret Curtis 6 years ago committed by GitHub
commit 144f37f9b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -104,26 +104,18 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
output += *length;
// Scary scary fall throughs.
switch (*length)
int lengthLeft = *length;
while (lengthLeft > 1)
{
case 4:
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
case 3:
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
case 2:
--output;
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
input >>= 6;
case 1:
--lengthLeft;
}
--output;
*output = (char)(input | FIRST_BYTE_MARK[*length]);
}
}
/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ )

Loading…
Cancel
Save