Re: Odd behavior of darray.dup

2019-02-26 Thread Dmitriy via Digitalmars-d-learn
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 t

Re: Odd behavior of darray.dup

2019-02-24 Thread Bastiaan Veelo via Digitalmars-d-learn
On Sunday, 24 February 2019 at 12:10:22 UTC, Bastiaan Veelo wrote: 1) You get "immutable(Color)(#{overlap raw, colors})" on immutable Color because the `Color.toString()` method is not const (corrected in the Gist). This is a bug in pixelperfectengine. Likewise, getters like `green()` should be

Re: Odd behavior of darray.dup

2019-02-24 Thread Bastiaan Veelo via Digitalmars-d-learn
On Saturday, 23 February 2019 at 23:35:14 UTC, solidstate1991 wrote: On Saturday, 23 February 2019 at 19:21:10 UTC, Bastiaan Veelo wrote: It works for me: https://run.dlang.io/gist/473b0021487275751accaebeb00be05c -- Bastiaan Still no luck, not even with memcpy. There's even more mystery as

Re: Odd behavior of darray.dup

2019-02-23 Thread solidstate1991 via Digitalmars-d-learn
On Saturday, 23 February 2019 at 19:21:10 UTC, Bastiaan Veelo wrote: It works for me: https://run.dlang.io/gist/473b0021487275751accaebeb00be05c -- Bastiaan Still no luck, not even with memcpy. There's even more mystery as I printed out the original static immutable array's content, which i

Re: Odd behavior of darray.dup

2019-02-23 Thread Bastiaan Veelo via Digitalmars-d-learn
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 t

Odd behavior of darray.dup

2019-02-22 Thread solidstate1991 via Digitalmars-d-learn
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.