second phase of deprecated method removal.

git-svn-id: svn://10.0.0.236/trunk@62710 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
2000-03-12 10:01:10 +00:00
parent 11fb3b709c
commit 86e1f012cc
6 changed files with 34 additions and 118 deletions

View File

@@ -147,7 +147,7 @@ nsHTMLEntities::ReleaseTable(void)
}
PRInt32
nsHTMLEntities::EntityToUnicode(const nsString& aEntity)
nsHTMLEntities::EntityToUnicode(const nsCString& aEntity)
{
NS_ASSERTION(gEntityToCodeTree, "no lookup table, needs addref");
if (gEntityToCodeTree) {
@@ -173,31 +173,12 @@ nsHTMLEntities::EntityToUnicode(const nsString& aEntity)
return -1;
}
PRInt32
nsHTMLEntities::EntityToUnicode(const nsCString& aEntity)
{
NS_ASSERTION(gEntityToCodeTree, "no lookup table, needs addref");
if (gEntityToCodeTree) {
//this little piece of code exists because entities may or may not have the terminating ';'.
//if we see it, strip if off for this test...
PRUnichar theLastChar=GetCharAt(aEntity,aEntity.mLength-1);
if(';'==theLastChar) {
nsCAutoString temp(aEntity);
temp.Truncate(aEntity.mLength-1);
return EntityToUnicode(temp);
}
EntityNode node(aEntity);
EntityNode* found = (EntityNode*)gEntityToCodeTree->FindItem(&node);
if (found) {
NS_ASSERTION(found->mStr.Equals(aEntity.mUStr,PR_FALSE,aEntity.mLength), "bad tree");
return found->mUnicode;
}
}
return -1;
nsHTMLEntities::EntityToUnicode(const nsString& aEntity) {
nsCAutoString theEntity(aEntity);
PRInt32 result=EntityToUnicode(theEntity);
return result;
}
const nsCString&