From 2577bfb047f72e0d5c419c331b4058d5b083e82e 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=C3=BB=20Some=20methods=20in=20l?= =?UTF-8?q?ayout/style=20could=20be=20const=20r+sr=3Ddbaron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.0.0.236/trunk@219248 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/style/nsCSSValue.h | 6 +++--- mozilla/layout/style/nsStyleStruct.cpp | 2 +- mozilla/layout/style/nsStyleStruct.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/style/nsCSSValue.h b/mozilla/layout/style/nsCSSValue.h index 8179bec72e6..2a55d3b5003 100644 --- a/mozilla/layout/style/nsCSSValue.h +++ b/mozilla/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/mozilla/layout/style/nsStyleStruct.cpp b/mozilla/layout/style/nsStyleStruct.cpp index b71b252ab41..e3c18aebc14 100644 --- a/mozilla/layout/style/nsStyleStruct.cpp +++ b/mozilla/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/mozilla/layout/style/nsStyleStruct.h b/mozilla/layout/style/nsStyleStruct.h index ecb0456cce4..dfcd0cd0731 100644 --- a/mozilla/layout/style/nsStyleStruct.h +++ b/mozilla/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: