[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31941 - branches/issue-2843-dev/subversion/libsvn_wc

From: Rui, Guo <timmyguo_at_mail.ustc.edu.cn>
Date: Wed, 2 Jul 2008 20:30:51 +0800

On Wed, Jul 02, 2008 at 08:42:20AM +0000, Lorenz wrote:
> >>> + invalid = is_this_dir ^ (entry->depth != svn_depth_exclude);
> >>
> >> I'm pretty sure as a style issue we don't use bitwise operations in
> >> boolean operations here. If you could rewrite that in normal !, && and
> >> || that would be clearer.
> >The logic here is indeed XOR. What if I change this to the following?
> > invalid = (is_this_dir ^ (entry->depth != svn_depth_exclude)) == 1;
>
> just use != as the boolean equivalent
>
> invalid = is_this_dir != (entry->depth != svn_depth_exclude);
Thanks. This looks great!

Rui

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-07-02 14:31:11 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.