From b06069995013d52e26f0f34059b5c03fdf32b71f Mon Sep 17 00:00:00 2001 From: Ferdinand Majerech Date: Wed, 23 Jul 2014 00:46:37 +0200 Subject: [PATCH] Removed a GC allocation. --- source/dyaml/reader.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dyaml/reader.d b/source/dyaml/reader.d index 99376cb..60fc59a 100644 --- a/source/dyaml/reader.d +++ b/source/dyaml/reader.d @@ -196,9 +196,9 @@ final class Reader /// Params: length = Number or characters to get. /// /// Returns: Characters starting at current position. - dstring get(size_t length) @safe pure nothrow + dstring get(size_t length) @safe pure nothrow @nogc { - auto result = prefix(length).idup; + auto result = prefix(length); forward(length); return result; }