3 ms·
Casting smaller doesn't hurt if the numbers are small and you're little endian - because the ptr will still point at the meat of the scalar (instead of the high
by JoeAltmaier 12y ago
Casting smaller doesn't hurt if the numbers are small and you're little endian - because the ptr will still point at the meat of the scalar (instead of the high bytes with zeros in them as it would if big-endian)
- duaneb 12y agoI'm not sure you understand big-endian casting—it's still value based, so you'll still get the least significant bits in the casted value.
- JoeAltmaier 12y agoThe issue was, casting an untyped pointer which does NOT get the conversion you mention.