This commit is contained in:
peterl%netscape.com 1999-07-18 00:59:40 +00:00
Родитель 9a75d4b2f6
Коммит b06a4e3232
3 изменённых файлов: 18 добавлений и 9 удалений

Просмотреть файл

@ -94,7 +94,8 @@ protected:
* @return true if they are identical (contain same stuff).
*/
PRBool nsAVLTree::operator==(const nsAVLTree& aCopy) const{
void* theItem=FirstThat(CDoesntExist(aCopy));
CDoesntExist functor(aCopy);
void* theItem=FirstThat(functor);
PRBool result=PRBool(!theItem);
return result;
}
@ -581,10 +582,12 @@ static void*
avlFirstThat(nsAVLNode* aNode, nsAVLNodeFunctor& aFunctor) {
void* result=nsnull;
if(aNode) {
if (result = avlFirstThat(aNode->mLeft,aFunctor)) {
result = avlFirstThat(aNode->mLeft,aFunctor);
if (result) {
return result;
}
if (result = aFunctor(aNode->mValue)) {
result = aFunctor(aNode->mValue);
if (result) {
return result;
}
result = avlFirstThat(aNode->mRight,aFunctor);

Просмотреть файл

@ -94,7 +94,8 @@ protected:
* @return true if they are identical (contain same stuff).
*/
PRBool nsAVLTree::operator==(const nsAVLTree& aCopy) const{
void* theItem=FirstThat(CDoesntExist(aCopy));
CDoesntExist functor(aCopy);
void* theItem=FirstThat(functor);
PRBool result=PRBool(!theItem);
return result;
}
@ -581,10 +582,12 @@ static void*
avlFirstThat(nsAVLNode* aNode, nsAVLNodeFunctor& aFunctor) {
void* result=nsnull;
if(aNode) {
if (result = avlFirstThat(aNode->mLeft,aFunctor)) {
result = avlFirstThat(aNode->mLeft,aFunctor);
if (result) {
return result;
}
if (result = aFunctor(aNode->mValue)) {
result = aFunctor(aNode->mValue);
if (result) {
return result;
}
result = avlFirstThat(aNode->mRight,aFunctor);

Просмотреть файл

@ -94,7 +94,8 @@ protected:
* @return true if they are identical (contain same stuff).
*/
PRBool nsAVLTree::operator==(const nsAVLTree& aCopy) const{
void* theItem=FirstThat(CDoesntExist(aCopy));
CDoesntExist functor(aCopy);
void* theItem=FirstThat(functor);
PRBool result=PRBool(!theItem);
return result;
}
@ -581,10 +582,12 @@ static void*
avlFirstThat(nsAVLNode* aNode, nsAVLNodeFunctor& aFunctor) {
void* result=nsnull;
if(aNode) {
if (result = avlFirstThat(aNode->mLeft,aFunctor)) {
result = avlFirstThat(aNode->mLeft,aFunctor);
if (result) {
return result;
}
if (result = aFunctor(aNode->mValue)) {
result = aFunctor(aNode->mValue);
if (result) {
return result;
}
result = avlFirstThat(aNode->mRight,aFunctor);