From cf9b189a19c69818d7ebbae02c08f4289dc88094 Mon Sep 17 00:00:00 2001 From: "dbaron%dbaron.org" Date: Tue, 7 Oct 2003 22:15:26 +0000 Subject: [PATCH] Fix HP-UX and AIX bustage. b=221316 --- content/html/document/src/nsHTMLDocument.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index 6bcc88c8deed..26fdc703e9bf 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -1221,19 +1221,24 @@ nsHTMLDocument::InternalAddStyleSheet(nsIStyleSheet* aSheet, PRUint32 aFlags) { if (aSheet == mAttrStyleSheet) { // always first NS_ASSERTION(mStyleSheets.Count() == 0 || - mAttrStyleSheet != mStyleSheets[0], + mAttrStyleSheet != + NS_STATIC_CAST(nsIStyleSheet*, mStyleSheets[0]), "Adding attr sheet twice!"); mStyleSheets.InsertObjectAt(aSheet, 0); } else if (aSheet == mStyleAttrStyleSheet) { // always last NS_ASSERTION(mStyleSheets.Count() == 0 || - mStyleSheets[mStyleSheets.Count() - 1] != mStyleAttrStyleSheet, + NS_STATIC_CAST(nsIStyleSheet*, + mStyleSheets[mStyleSheets.Count() - 1]) != + mStyleAttrStyleSheet, "Adding style attr sheet twice!"); mStyleSheets.AppendObject(aSheet); } else { PRInt32 count = mStyleSheets.Count(); - if (count != 0 && mStyleAttrStyleSheet == mStyleSheets[count - 1]) { + if (count != 0 && + mStyleAttrStyleSheet == + NS_STATIC_CAST(nsIStyleSheet*, mStyleSheets[count - 1])) { // keep attr sheet last mStyleSheets.InsertObjectAt(aSheet, count - 1); }