From 86f9e69842247654853986fac9dcbd1c8da30b75 Mon Sep 17 00:00:00 2001 From: "mozilla.BenB%bucksch.org" Date: Mon, 5 Feb 2001 10:25:00 +0000 Subject: [PATCH] 65488: Small speed improvements. Obviously intended by mscott, but not actually taken advantage of, till now. sr=mscott, r=dougt. git-svn-id: svn://10.0.0.236/trunk@86210 18797224-902f-48f8-a5cc-f745e15eee43 --- .../netwerk/streamconv/converters/mozTXTToHTMLConv.cpp | 9 ++++----- mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp index 4289f8346f8..c884c550bf5 100644 --- a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp +++ b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.cpp @@ -24,7 +24,7 @@ * License for the specific language governing rights and limitations * under the License. * - * The Original Code is the Text to HTML converter code. + * The Original Code is the Mozilla Text to HTML converter code. * * The Initial Developer of the Original Code is Ben Bucksch * . Portions created by Ben Bucksch are Copyright @@ -1024,7 +1024,7 @@ mozTXTToHTMLConv::ScanHTML(nsString& aInString, PRUint32 whattodo, nsString &aOu // Look for simple entities not included in a tags and scan them. /* Skip all tags ("<[...]>") and content in an a tag (""). Unescape the rest (text between tags) and pass it to ScanTXT. */ - for (PRInt32 i = 0; PRUint32(i) < aInString.Length();) + for (PRInt32 i = 0; PRUint32(i) < lengthOfInString;) { if (aInString[i] == '<') // html tag { @@ -1042,7 +1042,7 @@ mozTXTToHTMLConv::ScanHTML(nsString& aInString, PRUint32 whattodo, nsString &aOu { i = aInString.FindChar('>', PR_FALSE, i); if (i == kNotFound) - i =lengthOfInString; + i = lengthOfInString; else i++; } @@ -1057,9 +1057,8 @@ mozTXTToHTMLConv::ScanHTML(nsString& aInString, PRUint32 whattodo, nsString &aOu nsString tempString; tempString.SetCapacity(PRUint32((PRUint32(i) - start) * growthRate)); - UnescapeStr(aInString.GetUnicode(), start, PRUint32(i) - start, tempString); + UnescapeStr(uniBuffer, start, PRUint32(i) - start, tempString); ScanTXT(tempString.GetUnicode(), tempString.Length(), whattodo, aOutString); - } } diff --git a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.h b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.h index 22af818373e..272f63c736a 100644 --- a/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.h +++ b/mozilla/netwerk/streamconv/converters/mozTXTToHTMLConv.h @@ -24,7 +24,7 @@ * License for the specific language governing rights and limitations * under the License. * - * The Original Code is the Text to HTML converter code. + * The Original Code is the Mozilla Text to HTML converter code. * * The Initial Developer of the Original Code is Ben Bucksch * . Portions created by Ben Bucksch are Copyright