Skip to content

Commit

Permalink
core.memory.__delete instead of deprecated delete for newer compilers (
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Colvin authored May 14, 2018
1 parent 6e0c49e commit fcff98d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion source/scid/core/memory.d
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,15 @@ if(Appends!(T, U)) {
auto oldPtr = to.ptr;
to ~= from;
if (oldPtr != to.ptr)
delete oldPtr;
{
static if (__VERSION__ >= 2079)
{
import core.memory : __delete;
__delete(oldPtr);
}
else
delete oldPtr;
}
}

unittest {
Expand Down

0 comments on commit fcff98d

Please sign in to comment.