I don't think it is...

false && false == false, right?

I want a NOT XOR.  I could do !(goodUser ^ goodPass)...



From:	Mike Rhodes <notifications@github.com>
To:	cloudant/CDTDatastore <CDTDatastore@noreply.github.com>
Cc:	Adam Cox <gadamc@cloudant.com>
Date:	05/29/2014 03:07
Subject:	Re: [CDTDatastore] Adds support for filtered pull replication.
            (#23)



In Classes/common/CDTReplicator/CDTAbstractReplication.m:


> +            NSDictionary *userInfo = @{NSLocalizedDescriptionKey:
NSLocalizedString(msg, nil)};
> +            *error = [NSError errorWithDomain:CDTReplicationErrorDomain
> +
code:CDTReplicationErrorInvalidScheme
> +                                     userInfo:userInfo];
> +        }
> +        return NO;
> +
> +    }
> +
> +    //edge case: need to invalidate URLs like
'https://:password@myurl.com' and 'https://adam:@myurl.com'
> +    // or not???
> +    BOOL goodUser = self.remoteDatastore.user != nil
&& ![self.remoteDatastore.user isEqualToString:@""];
> +    BOOL goodPass = self.remoteDatastore.password != nil
&& ![self.remoteDatastore.password isEqualToString:@""];
> +
> +    if ( (goodUser && !goodPass)  ||
> +         (!goodUser && goodPass) ) {



if (!(goodUser && goodPass)) is logically equivalent.


—
Reply to this email directly or view it on GitHub.