Remove dead nsString::GetBuffer() code usage. r=dbaron, rs=scc.

This commit is contained in:
jaggernaut%netscape.com 2001-10-14 04:57:59 +00:00
parent 2e1b8508e3
commit b9f4fd8c36
5 changed files with 7 additions and 22 deletions

View File

@ -215,22 +215,15 @@ void nsFontMetricsMac::RealizeFont()
unicodeMappingUtil = nsUnicodeMappingUtil::GetSingleton ();
if (unicodeMappingUtil)
{
const char *theCString;
nsAutoString theLangGroupString;
if (mLangGroup)
mLangGroup->ToString(theLangGroupString);
else
theLangGroupString.AssignWithConversion("ja");
theCString = theLangGroupString.GetBuffer ();
if (theCString)
theScriptCode = unicodeMappingUtil->MapLangGroupToScriptCode (theCString);
else
{
NS_ConvertUCS2toUTF8 theUnicodeString(theLangGroupString);
theScriptCode = unicodeMappingUtil->MapLangGroupToScriptCode(theUnicodeString.get());
}
theScriptCode = unicodeMappingUtil->MapLangGroupToScriptCode(
NS_ConvertUCS2toUTF8(theLangGroupString).get());
}
else

View File

@ -700,7 +700,7 @@ nsLoggingSink::LeafNode(const nsIParserNode& aNode)
if (pos >= 0) {
tmp.Cut(pos, 1);
}
PR_fprintf(mOutput, "<entity value=\"%s\"/>\n", tmp.GetBuffer());
PR_fprintf(mOutput, "<entity value=\"%s\"/>\n", NS_LossyConvertUCS2toASCII(tmp).get());
break;
default:

View File

@ -3294,7 +3294,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
{
PLUGIN_LOG(PLUGIN_LOG_NORMAL,
("nsPluginHostImpl::InstatiateFullPagePlugin Begin mime=%s, owner=%p, url=%s\n",
aMimeType, aOwner, aURLSpec.GetBuffer()));
aMimeType, aOwner, NS_LossyConvertUCS2toASCII(aURLSpec).get()));
nsresult rv;
nsIURI *url;
@ -3351,7 +3351,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateFullPagePlugin(const char *aMimeType,
PLUGIN_LOG(PLUGIN_LOG_NORMAL,
("nsPluginHostImpl::InstatiateFullPagePlugin End mime=%s, rv=%d, owner=%p, url=%s\n",
aMimeType, rv, aOwner, aURLSpec.GetBuffer()));
aMimeType, rv, aOwner, NS_LossyConvertUCS2toASCII(aURLSpec).get()));
return rv;
}

View File

@ -700,7 +700,7 @@ nsLoggingSink::LeafNode(const nsIParserNode& aNode)
if (pos >= 0) {
tmp.Cut(pos, 1);
}
PR_fprintf(mOutput, "<entity value=\"%s\"/>\n", tmp.GetBuffer());
PR_fprintf(mOutput, "<entity value=\"%s\"/>\n", NS_LossyConvertUCS2toASCII(tmp).get());
break;
default:

View File

@ -395,15 +395,7 @@ const char *nsWidgetModuleData::ConvertFromUcs( const PRUnichar *pText)
const char *nsWidgetModuleData::ConvertFromUcs( const nsString &aString)
{
const char *szRet = 0;
const PRUnichar *pUnicode = aString.get();
if( pUnicode)
szRet = ConvertFromUcs( pUnicode);
else
szRet = aString.GetBuffer(); // hrm.
return szRet;
return ConvertFromUcs( aString.get());
}
ATOM nsWidgetModuleData::GetAtom( const char *atomname)