mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
Remove dead nsString::GetBuffer() code usage. r=dbaron, rs=scc.
This commit is contained in:
parent
2e1b8508e3
commit
b9f4fd8c36
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user