Nonportable code in C++ support

Kris Wong wongk at seapine.com
Wed Feb 13 12:53:16 UTC 2008


> But since the hash-values are always 32 bit, won"t you then
> get a warning when
> casting long -> uint? :) Of course, any way of removing the
> warning is fine.

int hash = (int)((size_t)ptr + [whatever]);

Let's not forget, longs are 4 bytes on 64 bit Windows.

Kris Wong




More information about the KDevelop-devel mailing list