From 3693575c2db1f7c4f9867706f9649702acc02582 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Sun, 28 Aug 2016 07:03:34 +0200 Subject: [PATCH] use ctRegex + avoid array allocation --- rdmd.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rdmd.d b/rdmd.d index 27e8e55f37..5e9eede776 100644 --- a/rdmd.d +++ b/rdmd.d @@ -289,7 +289,7 @@ int main(string[] args) } // Have at it - if (chain(root.only, myDeps.byKey).array.anyNewerThan(lastBuildTime)) + if (chain(root.only, myDeps.byKey).anyNewerThan(lastBuildTime)) { immutable result = rebuild(root, exe, workDir, objDir, myDeps, compilerFlags, addStubMain); @@ -617,7 +617,7 @@ private string[string] getDependencies(string rootModule, string workDir, scope(exit) collectException(depsReader.close()); // don't care for errors // Fetch all dependencies and append them to myDeps - auto pattern = regex(r"^(import|file|binary|config|library)\s+([^\(]+)\(?([^\)]*)\)?\s*$"); + auto pattern = ctRegex!(r"^(import|file|binary|config|library)\s+([^\(]+)\(?([^\)]*)\)?\s*$"); string[string] result; foreach (string line; lines(depsReader)) {