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

git-svn-id: svn://10.0.0.236/trunk@96375 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbaron%fas.harvard.edu
2001-06-05 00:39:38 +00:00
parent cf62f803ac
commit be5fd03419
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;