[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: Re: koffice/krita/image
From: Marijn Kruisselbrink <marijn.kruisselbrink () kogmbh ! com>
Date: 2010-11-22 9:34:48
Message-ID: 201011220134.48961.marijn.kruisselbrink () kogmbh ! com
[Download RAW message or body]
On Monday, November 22, 2010 01:30:59 am Inge Wallin wrote:
> On Monday, November 22, 2010 10:23:58 Marijn Kruisselbrink wrote:
> > On Monday, November 22, 2010 01:16:00 am Inge Wallin wrote:
> > > On Monday, November 22, 2010 09:46:58 Marijn Kruisselbrink wrote:
> > > > SVN commit 1199523 by mkruisselbrink:
> > > >
> > > > fix compile for ARM
> > > >
> > > > M +2 -2 kis_curve_circle_mask_generator.cpp
> > > >
> > > > --- trunk/koffice/krita/image/kis_curve_circle_mask_generator.cpp
> > > > #1199522:1199523 @@ -117,11 +117,11 @@
> > > >
> > > > newList.append(newList.at(1));
> > > > newList[1] = (newList.at(0) + newList.at(2)) * 0.5;
> > > > // transoform it
> > > >
> > > > - newList[1].setY(qBound(0.0,newList.at(1).y() *
> > > > softness,1.0)); +
> > > > newList[1].setY(qBound<qreal>(0.0,newList.at(1).y() *
> > > > softness,1.0)); }else{
> > > >
> > > > // transform all points except first and last
> > > > for (int i = 1; i < size-1; i++){
> > > >
> > > > - newList[i].setY(qBound(0.0,newList.at(i).y() *
> > > > softness,1.0)); +
> > > > newList[i].setY(qBound<qreal>(0.0,newList.at(i).y() * softness,1.0));
> > > > }
> > > >
> > > > }
> > >
> > > Won't this do the multiplication with doubles and then cast the result
> > > to qreal? Same question for the other similar ARM fixes.
> >
> > The problem here was that the multiplication was already a qreal, but the
> > 0.0 and 1.0 are doubles, so by adding a <qreal> (or alternatively casting
> > both constants), all parameters are treated as qreals.
>
> Wouldn't it mean less conversions then to use qBound(qreal(0.0), ...)?
>
> I may be nitpicking, but I heard that using doubles anywhere on an ARM is
> really expensive.
I would be very surprised if that didn't result in exactly the same code being
generated.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic