Potential issue in kshareddatacache.cpp checkin revision 1193778

Thomas L├╝bking thomas.luebking at gmail.com
Sat Dec 4 12:01:33 GMT 2010


Am Saturday 04 December 2010 schrieb Thiago Macieira:
> 0u is ISO C standard.
Thanks, just worried because of the "cumbesome" C cast.

> Also, a literal integer is automatically converted to the right type if the
> size fits. So 0 is a valid unsigned integer, but 128 isn't a valid uchar.
Yes, but not for templates ;-)

uint a = 1;
uint b = qMax( a, 2 ); // -> gcc sulks - happens to me once ever again
uint b = qMax( a, 2u ); // noprob

Cheers,
Thomas




More information about the kde-core-devel mailing list