Ho!
I didn't realized I used the -Wfloat-conversion on C code only and not C++
when I did my previous round of float/double to int patch!

Looking into that now. There is a bunch of new warnings adding the flag but
seems (at first look) to be managable.

Working on the patch right now...

2017-03-14 0:11 GMT+07:00 Dirk Hohndel <d...@hohndel.org>:

> On Mon, Mar 13, 2017 at 09:07:31AM -0700, Linus Torvalds wrote:
> > On Mon, Mar 13, 2017 at 12:35 AM, Rick Walsh <rickmwa...@gmail.com>
> wrote:
> > >
> > >  void PlannerSettingsWidget::setAscRate75(int rate)
> > >  {
> > > -       
> > > SettingsObjectWrapper::instance()->planner_settings->setAscrate75(rate
> * UNIT_FACTOR);
> > > +       
> > > SettingsObjectWrapper::instance()->planner_settings->setAscrate75(rate
> * UNIT_FACTOR + 0.5);
> > >  }
> >
> > These should all definitely use "lrint()" rather than " + 0.5"
> > together with the integer truncation.
>
> Agreed since UNIT_FACTOR is a floating point number.
>
> Can you send a patch / pull request that does that instead?
>
> Thanks
>
> /D
> _______________________________________________
> subsurface mailing list
> subsurface@subsurface-divelog.org
> http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
>
_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to