reading from file

KaattuPoochi via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Dec 30 15:26:53 PST 2016


On Friday, 16 December 2016 at 08:03:22 UTC, Ali Çehreli wrote:
> shared static this() {
>     matrix = 
> (cast(immutable(int[width])*)buffer.ptr)[0..height];
>
>     // Make sure we did not copy into matrix
>     assert(cast(void*)matrix.ptr == cast(void*)buffer.ptr);
> }
>

Thanks Ali, this is neat!!


More information about the Digitalmars-d-learn mailing list