fixed wxHtmlParser::SkipCommentTag() to run the initial test in O(1) instead of O(n) in UTF8 build, makes big difference for large HTML files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -953,7 +953,7 @@ wxHtmlParser::SkipCommentTag(wxString::const_iterator& start,
|
|||||||
wxString::const_iterator p = start;
|
wxString::const_iterator p = start;
|
||||||
|
|
||||||
// comments begin with "<!--" in HTML 4.0
|
// comments begin with "<!--" in HTML 4.0
|
||||||
if ( end - p < 3 || *++p != '!' || *++p != '-' || *++p != '-' )
|
if ( p > end - 3 || *++p != '!' || *++p != '-' || *++p != '-' )
|
||||||
{
|
{
|
||||||
// not a comment at all
|
// not a comment at all
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user