mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
fix broken unittests
This commit is contained in:
parent
f5803c1505
commit
7afd13a6c6
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
module std.array;
|
||||
|
||||
private import std.c.stdio;
|
||||
private import core.memory;
|
||||
private import std.contracts;
|
||||
private import std.traits;
|
||||
private import std.string;
|
||||
|
@ -129,7 +130,7 @@ void insert(T, Range)(ref T[] array, size_t pos, Range stuff)
|
|||
newLength = oldLength + delta;
|
||||
|
||||
// Reallocate the array to make space for new content
|
||||
array = cast(T[]) realloc(array.ptr, newLength * array[0].sizeof);
|
||||
array = (cast(T*) core.memory.GC.realloc(array.ptr, newLength * array[0].sizeof))[0 .. newLength];
|
||||
assert(array.length == newLength);
|
||||
|
||||
// Move data in pos .. pos + stuff.length to the end of the array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue