From d40fd411946194f7a14538216650fe50d2561209 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Tue, 29 Nov 2011 11:49:59 -0500 Subject: [PATCH] whatever the cast is needed anyway lol --- web.d | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web.d b/web.d index 9a36d1b..31f56b1 100644 --- a/web.d +++ b/web.d @@ -1005,10 +1005,8 @@ void run(Provider)(Cgi cgi, Provider instantiation, int pathInfoStartingPoint = form = doc.requireSelector!Form("form"); } else { - Parameter[] params; + Parameter[] params = cast(Parameter[]) fun.parameters.dup; foreach(i, p; fun.parameters) { - // ugh - params ~= cast(Parameter) p; string value = ""; if(p.name in cgi.get) value = cgi.get[p.name]; @@ -1992,6 +1990,10 @@ string toUrlName(string name) { /// turns camelCase into human presentable capitalized words with spaces string beautify(string name) { string n; + + if(name.length == 0) + return name; + n ~= toUpper(name[0..1]); dchar last;