On Saturday, 16 January 2016 at 15:42:39 UTC, bearophile wrote:
Yazan D:

On Saturday, 16 January 2016 at 14:42:27 UTC, Yazan D wrote:
ubyte[] b = (cast(ubyte*) &a)[0 .. int.sizeof];

Better to use the actual size:

ubyte[] b = (cast(ubyte*) &a)[0 .. a.sizeof];

Bye,
bearophile

Good thinking, I won't have to change it around if I change the type of my co-ords later.

Thanks :)

Reply via email to