From 65690ab4d715067aaae34ecc4848a89e14125708 Mon Sep 17 00:00:00 2001 From: "longsonr%gmail.com" Date: Wed, 31 Jan 2007 13:59:26 +0000 Subject: [PATCH] =?UTF-8?q?Bug=20368703=20=EF=BF=BD=20Some=20methods=20in?= =?UTF-8?q?=20layout/style=20could=20be=20const=20r+sr=3Ddbaron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/style/nsCSSValue.h | 6 +++--- layout/style/nsStyleStruct.cpp | 2 +- layout/style/nsStyleStruct.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/layout/style/nsCSSValue.h b/layout/style/nsCSSValue.h index 8179bec72e6c..2a55d3b5003f 100644 --- a/layout/style/nsCSSValue.h +++ b/layout/style/nsCSSValue.h @@ -305,9 +305,9 @@ public: nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; } const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; } - PRUint16 Count() { return mCount; } + PRUint16 Count() const { return mCount; } - PRBool operator==(const Array& aOther) + PRBool operator==(const Array& aOther) const { if (mCount != aOther.mCount) return PR_FALSE; @@ -393,7 +393,7 @@ public: MOZ_COUNT_DTOR(nsCSSValue::URL); } - PRBool operator==(const URL& aOther) + PRBool operator==(const URL& aOther) const { PRBool eq; return NS_strcmp(GetBufferValue(mString), diff --git a/layout/style/nsStyleStruct.cpp b/layout/style/nsStyleStruct.cpp index b71b252ab412..e3c18aebc14f 100644 --- a/layout/style/nsStyleStruct.cpp +++ b/layout/style/nsStyleStruct.cpp @@ -1271,7 +1271,7 @@ nsStyleContentData& nsStyleContentData::operator=(const nsStyleContentData& aOth return *this; } -PRBool nsStyleContentData::operator==(const nsStyleContentData& aOther) +PRBool nsStyleContentData::operator==(const nsStyleContentData& aOther) const { if (mType != aOther.mType) return PR_FALSE; diff --git a/layout/style/nsStyleStruct.h b/layout/style/nsStyleStruct.h index ecb0456cce4e..dfcd0cd07310 100644 --- a/layout/style/nsStyleStruct.h +++ b/layout/style/nsStyleStruct.h @@ -918,9 +918,9 @@ struct nsStyleContentData { nsStyleContentData() : mType(nsStyleContentType(0)) { mContent.mString = nsnull; } ~nsStyleContentData(); nsStyleContentData& operator=(const nsStyleContentData& aOther); - PRBool operator==(const nsStyleContentData& aOther); + PRBool operator==(const nsStyleContentData& aOther) const; - PRBool operator!=(const nsStyleContentData& aOther) { + PRBool operator!=(const nsStyleContentData& aOther) const { return !(*this == aOther); } private: