Reduce the size of EntityNode from 92 bytes to 8 bytes (on 32-bit platforms) by holding a pointer to the string in the text segment or string owned by the creator instead of copying that string into an nsCAutoString. b=81746 r=harishd@netscape.com sr=vidur@netscape.com a=asa@mozilla.org

This commit is contained in:
dbaron@fas.harvard.edu
2001-06-05 00:39:38 +00:00
parent d142022a37
commit c35da71f92
6 changed files with 64 additions and 56 deletions

View File

@@ -115,8 +115,8 @@ NS_IMETHODIMP
nsParserService::HTMLConvertUnicodeToEntity(PRInt32 aUnicode,
nsCString& aEntity) const
{
const nsCString& str = nsHTMLEntities::UnicodeToEntity(aUnicode);
if (str.Length() > 0) {
const char* str = nsHTMLEntities::UnicodeToEntity(aUnicode);
if (str) {
aEntity.Assign(str);
}
return NS_OK;