deprecation warnings on new dmd

This commit is contained in:
Adam D. Ruppe 2017-11-04 14:41:19 -04:00
parent 120f42a135
commit ba5866422b
1 changed files with 5 additions and 5 deletions

10
web.d
View File

@ -1158,7 +1158,7 @@ CallInfo parseUrl(in ReflectionInfo* reflection, string url, string defaultFunct
} }
if(reflection.instantiation !is null) if(reflection.instantiation !is null)
info.postProcessors ~= &(reflection.instantiation._postProcess); info.postProcessors ~= &((cast()(reflection.instantiation))._postProcess);
if(name in reflection.functions) { if(name in reflection.functions) {
info.func = reflection.functions[name]; info.func = reflection.functions[name];
@ -1498,7 +1498,7 @@ void run(Provider)(Cgi cgi, Provider instantiation, size_t pathInfoStartingPoint
// this makes firefox ugly // this makes firefox ugly
//cgi.setResponseContentType("application/json"); //cgi.setResponseContentType("application/json");
auto json = toJsonValue(result); auto json = toJsonValue(result);
cgi.write(toJSON(&json), true); cgi.write(toJSON(json), true);
break; break;
case "script": case "script":
case "jsonp": case "jsonp":
@ -1547,7 +1547,7 @@ void run(Provider)(Cgi cgi, Provider instantiation, size_t pathInfoStartingPoint
if(result.result.type == JSON_TYPE.STRING) { if(result.result.type == JSON_TYPE.STRING) {
cgi.write(result.result.str, true); cgi.write(result.result.str, true);
} else { } else {
cgi.write(toJSON(&result.result), true); cgi.write(toJSON(result.result), true);
} }
} else { } else {
cgi.write(result.errorMessage, true); cgi.write(result.errorMessage, true);
@ -1616,7 +1616,7 @@ void run(Provider)(Cgi cgi, Provider instantiation, size_t pathInfoStartingPoint
cgi.write(returned, true); cgi.write(returned, true);
} else } else
cgi.write(htmlEntitiesEncode(toJSON(&result.result)), true); cgi.write(htmlEntitiesEncode(toJSON(result.result)), true);
break; break;
} }
@ -2110,7 +2110,7 @@ string toHtml(T)(T a) {
/// TIP: if you're building a Javascript function call by strings, toJson("your string"); will build a nicely escaped string for you of any type. /// TIP: if you're building a Javascript function call by strings, toJson("your string"); will build a nicely escaped string for you of any type.
string toJson(T)(T a) { string toJson(T)(T a) {
auto v = toJsonValue(a); auto v = toJsonValue(a);
return toJSON(&v); return toJSON(v);
} }
// FIXME: are the explicit instantiations of this necessary? // FIXME: are the explicit instantiations of this necessary?