[haiku-commits] Re: r38208 - haiku/trunk/src/kits/interface

  • From: Alex Wilson <yourpalal2@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 18 Aug 2010 12:40:18 -0600

On Wed, Aug 18, 2010 at 10:29 AM, Ingo Weinhold <ingo_weinhold@xxxxxx>wrote:

> On 2010-08-17 at 21:04:45 [+0200], yourpalal2@xxxxxxxxx wrote:
> > Author: yourpalal
> > Date: 2010-08-17 21:04:45 +0200 (Tue, 17 Aug 2010)
> > New Revision: 38208
> > Changeset: http://dev.haiku-os.org/changeset/38208
> >
> > Modified:
> >    haiku/trunk/src/kits/interface/SplitLayout.cpp
> > Log:
> > Fix Gcc4 build error from my previous commit.
>
> It also changes the semantics, regardless of the compiler.
>

Yes, this is actually what I wanted, I believe.


>
> > Modified: haiku/trunk/src/kits/interface/SplitLayout.cpp
> > ===================================================================
> > --- haiku/trunk/src/kits/interface/SplitLayout.cpp    2010-08-17 18:43:41
> > UTC (rev 38207)
> > +++ haiku/trunk/src/kits/interface/SplitLayout.cpp    2010-08-17 19:04:45
> > UTC (rev 38208)
> > @@ -958,8 +958,8 @@
> >      item->AlignInFrame(info->layoutFrame);
> >
> >      // if the item became visible, we need to update its internal layout
> > -    if (visibilityChanged && fOrientation != B_HORIZONTAL
> > -        || !HasHeightForWidth()) {
> > +    if (visibilityChanged && (fOrientation != B_HORIZONTAL
> > +        || !HasHeightForWidth())) {
> >          item->Relayout(true);
> >      }
> >  }
>
> To improve readability (and actually required by the coding style) that
> should read either
>
>        if (visibilityChanged && (fOrientation != B_HORIZONTAL
>                         || !HasHeightForWidth())) {
>
> or
>
>        if (visibilityChanged
>                && (fOrientation != B_HORIZONTAL || !HasHeightForWidth())) {
>
> I'd prefer the latter.
>

Sure, I'll do that one.

Thanks for being on the lookout!

--Alex

Other related posts: