Fix compatibility issue with dmd 2.071
This commit is contained in:
parent
38addb7a5b
commit
b41dcc9f37
@ -524,8 +524,13 @@ struct WriteBuffer(T = ubyte)
|
|||||||
assert(b.capacity == 8);
|
assert(b.capacity == 8);
|
||||||
assert(b.buffer_[0] == 23 && b.buffer_[1] == 255
|
assert(b.buffer_[0] == 23 && b.buffer_[1] == 255
|
||||||
&& b.buffer_[2] == 48 && b.buffer_[3] == 23 && b.buffer_[4] == 255);
|
&& b.buffer_[2] == 48 && b.buffer_[3] == 23 && b.buffer_[4] == 255);
|
||||||
|
}
|
||||||
|
|
||||||
b = WriteBuffer!ubyte(2);
|
///
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
auto b = WriteBuffer!ubyte(2);
|
||||||
|
ubyte[3] buf = [48, 23, 255];
|
||||||
|
|
||||||
b ~= buf;
|
b ~= buf;
|
||||||
assert(b.start == 0);
|
assert(b.start == 0);
|
||||||
@ -688,5 +693,5 @@ struct WriteBuffer(T = ubyte)
|
|||||||
|
|
||||||
private unittest
|
private unittest
|
||||||
{
|
{
|
||||||
static assert(is(WriteBuffer!int));
|
static assert(is(typeof(WriteBuffer!int(5))));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user