Odd behavior of darray.dup

Dmitriy dmitriy.mihaylichenko at gmail.com
Tue Feb 26 13:56:49 UTC 2019


On Friday, 22 February 2019 at 11:36:35 UTC, solidstate1991 wrote:
> If I want to copy an array of structs with .dup (cannot post 
> the link in question here at the moment due to non-working 
> clipboard, it's Color from pixelperfectengine.graphics.common) 
> I get all zeroes instead of the values from the original array. 
> I haven't disabled post-blit to my knowledge.
>
> Is it some kind of a bug, or the .dup function has some 
> behavior that's not currently documented on the site (such as 
> needing a copy constructor)?

got this response on 
https://run.dlang.io/gist/run-dlang/965a2fb793bda7b1a82b0512d78973f3?compiler=dmd:

0x00FF0000
0x00FF0000
0x00FF7B00
0xFF7B0000


More information about the Digitalmars-d-learn mailing list