mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Do not use fall-through
This commit is contained in:
parent
a19d55e035
commit
57e1462417
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;
|
output += *length;
|
||||||
|
|
||||||
// Scary scary fall throughs.
|
int lengthLeft = *length;
|
||||||
switch (*length)
|
while (lengthLeft > 1)
|
||||||
{
|
{
|
||||||
case 4:
|
--output;
|
||||||
--output;
|
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
||||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
input >>= 6;
|
||||||
input >>= 6;
|
--lengthLeft;
|
||||||
case 3:
|
}
|
||||||
--output;
|
|
||||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
--output;
|
||||||
input >>= 6;
|
*output = (char)(input | FIRST_BYTE_MARK[*length]);
|
||||||
case 2:
|
|
||||||
--output;
|
|
||||||
*output = (char)((input | BYTE_MARK) & BYTE_MASK);
|
|
||||||
input >>= 6;
|
|
||||||
case 1:
|
|
||||||
--output;
|
|
||||||
*output = (char)(input | FIRST_BYTE_MARK[*length]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user