lodo1995 / experimental.xml

A replacement of Phobos std.xml
https://lodo1995.github.io/experimental.xml
Boost Software License 1.0
20 stars 8 forks source link

Appender enlarge #20

Closed burner closed 8 years ago

burner commented 8 years ago
private void enlarge(size_t sz) {
    allocator.expandArray(arr, sz);
}

https://dlang.org/phobos/std_experimental_allocator.html#.expandArray

expandArray does what you implemented in enlarge. Maybe even remove enlarge all together.

lodo1995 commented 8 years ago

You're right. I don't know why I didn't use it in the first place. I'll fix it. The method will remain, as it also contains the logic to decide the expansion factor.

burner commented 8 years ago

No problem, sometimes you/me/everybody just misses stuff.

burner commented 8 years ago

+1