Better fix, with explicit temporary for gcc-2.7.2.3's lame self. (thanks for the assist, scc.)

This commit is contained in:
waterson%netscape.com 2000-09-29 06:45:22 +00:00
Родитель 6aead1bea9
Коммит a3e9232614
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -5440,7 +5440,10 @@ nsXULTemplateBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get resource URI");
if (NS_FAILED(rv)) return rv;
nsAutoString id = NS_ConvertUTF8toUCS2(uri);
// XXX because gcc-2.7.2.3 is too dumb to keep a
// compiler-generated temporary around.
NS_ConvertUTF8toUCS2 x(uri);
const nsAReadableString& id = x;
rv = realKid->SetAttribute(kNameSpaceID_None, nsXULAtoms::id, id, PR_FALSE);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to set id attribute");
if (NS_FAILED(rv)) return rv;

Просмотреть файл

@ -5440,7 +5440,10 @@ nsXULTemplateBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode,
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get resource URI");
if (NS_FAILED(rv)) return rv;
nsAutoString id = NS_ConvertUTF8toUCS2(uri);
// XXX because gcc-2.7.2.3 is too dumb to keep a
// compiler-generated temporary around.
NS_ConvertUTF8toUCS2 x(uri);
const nsAReadableString& id = x;
rv = realKid->SetAttribute(kNameSpaceID_None, nsXULAtoms::id, id, PR_FALSE);
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to set id attribute");
if (NS_FAILED(rv)) return rv;