Removed dead code (UTF8 sequences of length 5 are considered broken, removed dead branch in PI parsing)
git-svn-id: http://pugixml.googlecode.com/svn/trunk@161 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
5624befce1
commit
a2249c1304
@ -409,7 +409,6 @@ namespace
|
|||||||
else if (*str < 0xE0) length = 2;
|
else if (*str < 0xE0) length = 2;
|
||||||
else if (*str < 0xF0) length = 3;
|
else if (*str < 0xF0) length = 3;
|
||||||
else if (*str < 0xF8) length = 4;
|
else if (*str < 0xF8) length = 4;
|
||||||
else if (*str < 0xFC) length = 5;
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ch = ' ';
|
ch = ' ';
|
||||||
@ -421,9 +420,6 @@ namespace
|
|||||||
// Scary scary fall throughs.
|
// Scary scary fall throughs.
|
||||||
switch (length)
|
switch (length)
|
||||||
{
|
{
|
||||||
case 5:
|
|
||||||
ch <<= 6;
|
|
||||||
ch += (*str++ & UTF8_BYTE_MASK_READ);
|
|
||||||
case 4:
|
case 4:
|
||||||
ch <<= 6;
|
ch <<= 6;
|
||||||
ch += (*str++ & UTF8_BYTE_MASK_READ);
|
ch += (*str++ & UTF8_BYTE_MASK_READ);
|
||||||
@ -972,14 +968,11 @@ namespace
|
|||||||
cursor->name = mark;
|
cursor->name = mark;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_chartype(ch, ct_space))
|
// ch is a whitespace character, skip whitespaces
|
||||||
{
|
SKIPWS();
|
||||||
SKIPWS();
|
CHECK_ERROR(status_bad_pi, s);
|
||||||
CHECK_ERROR(status_bad_pi, s);
|
|
||||||
|
|
||||||
mark = s;
|
mark = s;
|
||||||
}
|
|
||||||
else mark = 0;
|
|
||||||
|
|
||||||
SCANFOR(*s == '?' && *(s+1) == '>'); // Look for '?>'.
|
SCANFOR(*s == '?' && *(s+1) == '>'); // Look for '?>'.
|
||||||
CHECK_ERROR(status_bad_pi, s);
|
CHECK_ERROR(status_bad_pi, s);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user