diff --git a/xpcom/ds/nsVoidBTree.cpp b/xpcom/ds/nsVoidBTree.cpp index 6f57d57ff991..8e832a203e54 100644 --- a/xpcom/ds/nsVoidBTree.cpp +++ b/xpcom/ds/nsVoidBTree.cpp @@ -289,7 +289,7 @@ nsVoidBTree::InsertElementAt(void* aElement, PRInt32 aIndex) // We're still in the index. Find the right leaf. Node* next = nsnull; - PRInt32 count = current->GetCount(); + count = current->GetCount(); for (PRInt32 i = 0; i < count; ++i) { Node* child = NS_REINTERPRET_CAST(Node*, current->GetElementAt(i)); @@ -422,7 +422,7 @@ nsVoidBTree::RemoveElementAt(PRInt32 aIndex) // We're still in the index. Find the right leaf. Node* next = nsnull; - PRInt32 count = current->GetCount(); + count = current->GetCount(); for (PRInt32 i = 0; i < count; ++i) { Node* child = NS_REINTERPRET_CAST(Node*, current->GetElementAt(i)); diff --git a/xpcom/ds/nsVoidBTree.h b/xpcom/ds/nsVoidBTree.h index b8b30b336177..3081370a7f87 100644 --- a/xpcom/ds/nsVoidBTree.h +++ b/xpcom/ds/nsVoidBTree.h @@ -148,7 +148,7 @@ protected: void InsertElementAt(void* aElement, PRInt32 aIndex); void RemoveElementAt(PRInt32 aIndex); - private: + protected: // XXX Not to be implemented Node(); ~Node(); @@ -272,14 +272,14 @@ public: public: ConstIterator() : mIsSingleton(PR_TRUE), mElement(nsnull) {} - ConstIterator(ConstIterator& aOther) : mIsSingleton(aOther.mIsSingleton) { + ConstIterator(const ConstIterator& aOther) : mIsSingleton(aOther.mIsSingleton) { if (mIsSingleton) mElement = aOther.mElement; else mPath = aOther.mPath; } ConstIterator& - operator=(ConstIterator& aOther) { + operator=(const ConstIterator& aOther) { mIsSingleton = aOther.mIsSingleton; if (mIsSingleton) mElement = aOther.mElement; @@ -308,7 +308,7 @@ public: ConstIterator operator--(int) { ConstIterator temp(*this); Prev(); - return *this; } + return temp; } PRBool operator==(const ConstIterator& aOther) const { return mIsSingleton ? mElement == aOther.mElement