diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2005-12-08 20:51:19 +0300 |
---|---|---|
committer | Atsushi Eno <atsushieno@gmail.com> | 2005-12-08 20:51:19 +0300 |
commit | e8fcabe5d2f277b6a9162dd448dc209536ff833a (patch) | |
tree | 3841298bff55ef5a9df7930e30166ac3e2655142 | |
parent | a516b8cf9aa976a560237567fb834fe03ac3eca2 (diff) |
2005-12-08 Atsushi Enomoto <atsushi@ximian.com>
* XmlTextReader.cs : avoid Char.IsSurrogate() and do it inside
PeekChar(), which improves notable performance.
svn path=/trunk/mcs/; revision=54116
-rw-r--r-- | mcs/class/System.XML/System.Xml/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/System.XML/System.Xml/XmlTextReader.cs | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/mcs/class/System.XML/System.Xml/ChangeLog b/mcs/class/System.XML/System.Xml/ChangeLog index fd0a97cc2ab..e2372baba8a 100644 --- a/mcs/class/System.XML/System.Xml/ChangeLog +++ b/mcs/class/System.XML/System.Xml/ChangeLog @@ -1,5 +1,10 @@ 2005-12-08 Atsushi Enomoto <atsushi@ximian.com> + * XmlTextReader.cs : avoid Char.IsSurrogate() and do it inside + PeekChar(), which improves notable performance. + +2005-12-08 Atsushi Enomoto <atsushi@ximian.com> + * XmlReaderSettings.cs : Schemas will be created only when it is required. diff --git a/mcs/class/System.XML/System.Xml/XmlTextReader.cs b/mcs/class/System.XML/System.Xml/XmlTextReader.cs index e4d3b9f45e0..1bca67d6f45 100644 --- a/mcs/class/System.XML/System.Xml/XmlTextReader.cs +++ b/mcs/class/System.XML/System.Xml/XmlTextReader.cs @@ -1110,7 +1110,7 @@ namespace System.Xml char c = peekChars [peekCharsIndex]; if (c == 0) return -1; - if (!char.IsSurrogate (c)) + if (c < 0xD800 || 0xDFFF < c) return c; if (peekCharsLength == peekCharsIndex + 1) { if (!ReadTextReader (c)) |