[Interest] Need argumentative help..... giving qobject copy/assignment constructor and put it in qlist/qmap

Jérôme Godbout jerome at bodycad.com
Thu Jul 23 15:12:54 CEST 2015


it should be "float f = 2.0f;" then. I understand the compiler should check
if value is in range and precision of a float before emitting a warning.
This mostly get annoying inside template function that can handle both
float and double, but putting a float inside a double is ok.

On Thu, Jul 23, 2015 at 1:51 AM, Bo Thorsen <bo at vikingsoft.eu> wrote:

> Den 23-07-2015 kl. 00:07 skrev Thiago Macieira:
> >> Disabling C4244 /* conversion from 'type1' to 'type2', possible loss of
> data
> >> >*/ is more than going to far. It is kind of sabotage imho.
> > Note that this does not apply to 64-bit to 32-bit conversions. Those are
> still
> > active, so C4244 does not seem to apply to them. I don't know what it
> applies
> > to.
>
> I think this one warns on "float f = 2.0;".
>
> In this particular instance, it's pretty dumb. 2.0 is perfectly fine
> inside a float. But it just warns every time you store a double in a
> float without trying to be clever about when you should receive the
> warning.
>
> Bo Thorsen,
> Director, Viking Software.
>
> --
> Viking Software
> Qt and C++ developers for hire
> http://www.vikingsoft.eu
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150723/34fd8fba/attachment.html>


More information about the Interest mailing list