зеркало из https://github.com/mozilla/pjs.git
fixing code that relied on implicit string construction
This commit is contained in:
Родитель
5e282caeb7
Коммит
983cda487f
|
@ -880,8 +880,9 @@ void nsDeviceContextMac :: InitFontInfoList()
|
|||
err = ::TECConvertText(converter, &fontName[1], fontName[0], &actualInputLength,
|
||||
(TextPtr)unicodeFontName , sizeof(unicodeFontName), &actualOutputLength);
|
||||
unicodeFontName[actualOutputLength / sizeof(PRUnichar)] = '\0';
|
||||
nsAutoString fontNameString(unicodeFontName);
|
||||
|
||||
FontNameKey key(unicodeFontName);
|
||||
FontNameKey key(fontNameString);
|
||||
gFontInfoList->Put(&key, (void*)fondID);
|
||||
}
|
||||
::ReleaseResource(fond);
|
||||
|
|
|
@ -312,7 +312,7 @@ nsUnicodeFontMappingMac* nsUnicodeFontMappingMac::GetCachedInstance(
|
|||
gCache = gUtil->GetFontMappingCache();
|
||||
|
||||
nsUnicodeFontMappingMac* obj = nsnull;
|
||||
nsAutoString key = aFont->name;
|
||||
nsAutoString key(aFont->name);
|
||||
key.AppendWithConversion(":");
|
||||
key.Append(aLangGroup);
|
||||
key.AppendWithConversion(":");
|
||||
|
|
|
@ -142,7 +142,7 @@ NS_IMETHODIMP nsGraphicsImpl::DrawString(const PRUnichar *text, nscoord x, nscoo
|
|||
NS_IMETHODIMP nsGraphicsImpl::SetFont(const PRUnichar *name, nscoord size)
|
||||
{
|
||||
size *= mDev2App;
|
||||
nsFont font(name, NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, size);
|
||||
nsFont font(nsAutoString(name), NS_FONT_STYLE_NORMAL, NS_FONT_VARIANT_NORMAL, NS_FONT_WEIGHT_NORMAL, NS_FONT_DECORATION_NONE, size);
|
||||
return mRenderer->SetFont(font);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче