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

Gunnar Roth gunnar.roth at gmx.de
Thu Jul 23 07:57:14 CEST 2015


> Am 23.07.2015 um 07:51 schrieb Bo Thorsen <bo at vikingsoft.eu>:
> 
> 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.
> 
I think, reading documentation is better than thinking ;-)

https://msdn.microsoft.com/en-us/library/2d7604yb.aspx <https://msdn.microsoft.com/en-us/library/2d7604yb.aspx>

Compiler Warning (level 2) C4244

argument' : conversion from 'type1' to 'type2', possible loss of data
A floating point type was converted to an integer type. A possible loss of data may have occurred.
https://msdn.microsoft.com/en-us/library/th7a07tz.aspx <https://msdn.microsoft.com/en-us/library/th7a07tz.aspx>
Compiler Warning (levels 3 and 4) C4244

'conversion' conversion from 'type1' to 'type2', possible loss of data
An integer type is converted to a smaller integer type. This is a level-4 warning if type1 is int and type2 is smaller than int. Otherwise, it is a level 3 (assigned a value of type __int64 <https://msdn.microsoft.com/en-us/library/29dh1w7z.aspx> to a variable of type unsigned int). A possible loss of data may have occurred.
Regards,
Gunnar Roth


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150723/c00a56fc/attachment.html>


More information about the Interest mailing list