summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-20 20:25:13 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2009-10-20 20:25:13 +0000
commita2249c1304564c96ddd1c052043f8d5ef53e2112 (patch)
treea6c184e0c8cfe67312bc687d79eda790e8c76bf7 /src
parent5624befce1d64824efe7f57ef02b62a7be934404 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 1061447..9ae757b 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -409,7 +409,6 @@ namespace
else if (*str < 0xE0) length = 2;
else if (*str < 0xF0) length = 3;
else if (*str < 0xF8) length = 4;
- else if (*str < 0xFC) length = 5;
else
{
ch = ' ';
@@ -421,9 +420,6 @@ namespace
// Scary scary fall throughs.
switch (length)
{
- case 5:
- ch <<= 6;
- ch += (*str++ & UTF8_BYTE_MASK_READ);
case 4:
ch <<= 6;
ch += (*str++ & UTF8_BYTE_MASK_READ);
@@ -972,14 +968,11 @@ namespace
cursor->name = mark;
}
- if (is_chartype(ch, ct_space))
- {
- SKIPWS();
- CHECK_ERROR(status_bad_pi, s);
+ // ch is a whitespace character, skip whitespaces
+ SKIPWS();
+ CHECK_ERROR(status_bad_pi, s);
- mark = s;
- }
- else mark = 0;
+ mark = s;
SCANFOR(*s == '?' && *(s+1) == '>'); // Look for '?>'.
CHECK_ERROR(status_bad_pi, s);