From 975a4251e86daf70c694a2241c0110203f79bfd7 Mon Sep 17 00:00:00 2001 From: Laurent MONIN Date: Tue, 6 Dec 2005 15:07:49 +0100 Subject: [PATCH] parse_table(): reorder code to optimize even more. --- src/document/html/parser/table.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/document/html/parser/table.c b/src/document/html/parser/table.c index 1570cae2..e6d03645 100644 --- a/src/document/html/parser/table.c +++ b/src/document/html/parser/table.c @@ -670,9 +670,11 @@ see: goto see; } + /* All following tags have T as first letter. */ + if (toupper(name[0]) != 'T') goto see; + /* /TR /TD /TH */ - if (closing_tag && namelen == 2 - && toupper(name[0]) == 'T') { + if (closing_tag && namelen == 2) { unsigned char c = toupper(name[1]); if (c == 'R' || c == 'D' || c == 'H') { @@ -688,9 +690,6 @@ see: } } - /* All following tags have T as first letter. */ - if (toupper(t_name[0]) != 'T') goto see; - /* TR */ if (t_namelen == 2 && toupper(t_name[1]) == 'R') { if (c_span) new_columns(table, c_span, c_width, c_al, c_val, 1);