fix linux

git-svn-id: svn://10.0.0.236/trunk@39968 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peterl%netscape.com
1999-07-18 00:59:40 +00:00
parent 5b999b1936
commit 06263e6a1c
3 changed files with 18 additions and 9 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);