Count() is no longer const

git-svn-id: svn://10.0.0.236/trunk@31215 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
1999-05-12 02:55:54 +00:00
parent f42c46d667
commit 9ec77255f1
3 changed files with 12 additions and 6 deletions

View File

@@ -1804,7 +1804,8 @@ void CSSStyleSheetImpl::AppendStyleRule(nsICSSStyleRule* aRule)
PRInt32 CSSStyleSheetImpl::StyleRuleCount(void) const
{
if (mOrderedRules.IsNotNull()) {
return mOrderedRules->Count();
// cast away const-ness
return ((nsISupportsArrayPtr)mOrderedRules)->Count();
}
return 0;
}
@@ -1883,7 +1884,8 @@ void CSSStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
child = ((CSSStyleSheetImpl*)child)->mNext;
}
PRInt32 count = (mWeightedRules.IsNotNull() ? mWeightedRules->Count() : 0);
// cast away const-ness
PRInt32 count = (mWeightedRules.IsNotNull() ? ((nsISupportsArrayPtr)mWeightedRules)->Count() : 0);
for (index = 0; index < count; index++) {
nsICSSStyleRulePtr rule = (nsICSSStyleRule*)mWeightedRules->ElementAt(index);

View File

@@ -1804,7 +1804,8 @@ void CSSStyleSheetImpl::AppendStyleRule(nsICSSStyleRule* aRule)
PRInt32 CSSStyleSheetImpl::StyleRuleCount(void) const
{
if (mOrderedRules.IsNotNull()) {
return mOrderedRules->Count();
// cast away const-ness
return ((nsISupportsArrayPtr)mOrderedRules)->Count();
}
return 0;
}
@@ -1883,7 +1884,8 @@ void CSSStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
child = ((CSSStyleSheetImpl*)child)->mNext;
}
PRInt32 count = (mWeightedRules.IsNotNull() ? mWeightedRules->Count() : 0);
// cast away const-ness
PRInt32 count = (mWeightedRules.IsNotNull() ? ((nsISupportsArrayPtr)mWeightedRules)->Count() : 0);
for (index = 0; index < count; index++) {
nsICSSStyleRulePtr rule = (nsICSSStyleRule*)mWeightedRules->ElementAt(index);

View File

@@ -1804,7 +1804,8 @@ void CSSStyleSheetImpl::AppendStyleRule(nsICSSStyleRule* aRule)
PRInt32 CSSStyleSheetImpl::StyleRuleCount(void) const
{
if (mOrderedRules.IsNotNull()) {
return mOrderedRules->Count();
// cast away const-ness
return ((nsISupportsArrayPtr)mOrderedRules)->Count();
}
return 0;
}
@@ -1883,7 +1884,8 @@ void CSSStyleSheetImpl::List(FILE* out, PRInt32 aIndent) const
child = ((CSSStyleSheetImpl*)child)->mNext;
}
PRInt32 count = (mWeightedRules.IsNotNull() ? mWeightedRules->Count() : 0);
// cast away const-ness
PRInt32 count = (mWeightedRules.IsNotNull() ? ((nsISupportsArrayPtr)mWeightedRules)->Count() : 0);
for (index = 0; index < count; index++) {
nsICSSStyleRulePtr rule = (nsICSSStyleRule*)mWeightedRules->ElementAt(index);