forked from teamnwah/openmw-tes3coop
Merge pull request #1860 from akortunov/warningfix
Do not use fall-through to avoid GCC warnings
This commit is contained in:
commit
144f37f9b3
1 changed files with 11 additions and 19 deletions
30
extern/oics/tinyxmlparser.cpp
vendored
30
extern/oics/tinyxmlparser.cpp
vendored
|
@ -104,25 +104,17 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
|
|||
|
||||
output += *length;
|
||||
|
||||
// Scary scary fall throughs.
|
||||
switch (*length)
|
||||
{
|
||||
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:
|
||||
--output;
|
||||
*output = (char)(input | FIRST_BYTE_MARK[*length]);
|
||||
}
|
||||
int lengthLeft = *length;
|
||||
while (lengthLeft > 1)
|
||||
{
|
||||
--output;
|
||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||
input >>= 6;
|
||||
--lengthLeft;
|
||||
}
|
||||
|
||||
--output;
|
||||
*output = (char)(input | FIRST_BYTE_MARK[*length]);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue