Search

August 05, 2020
General »
Maybe with a ref parameter, but I think this will only move the problem outside...
August 05, 2020
General »
...what I can tell -- bytes[] returns a ubyte[].

If this were std.container.array.Array...
August 05, 2020
General »
...It returns the first ubyte in the `buffer`. Once read, the ubyte is deleted from...
August 05, 2020
General »
...The different behavior is due to `read!ubyte` which removes the byte from the buffer...
August 05, 2020
General »
...of this function. What does buffer.read!ubyte do?

If you have a more descriptive...
August 05, 2020
General »
You just leaked str_ptr there. It gets overwritten by bytes' ptr.
I imagine what...
August 05, 2020
General »
...ref const(ubyte)[] buffer) @nogc nothrow
{
    Array!ubyte bytes;

    ubyte b = buffer.read!ubyte();
    while...
August 03, 2020
General »
...too. Like

struct A {
  int a = 10;
  ubyte[10000] b = void;
  int c = 20;
}

Could...
August 03, 2020
General »
...Eh, what if you did

class A {
    ubyte[__traits(classInstanceSize, A)] recursive;
}

it gives a...
August 02, 2020
Learn »
...struct Color {
  ubyte r;
  ubyte g;
  ubyte b;
}

// Assumes data is one ubyte per line...
88 89 90 91 92 93 94 95 96 97 98 99
Next ›   Last »