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

git-svn-id: svn://10.0.0.236/trunk@80140 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
waterson%netscape.com
2000-09-29 06:45:22 +00:00
parent c78a8b32d2
commit 4f16bfd129
2 changed files with 8 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;