use empty() instead of comparisons

This commit is contained in:
Dennis Luxen 2013-09-19 10:19:54 +02:00
parent e67541e82f
commit cc94ab6411

View File

@ -55,7 +55,7 @@ public:
//json //json
// JSONParameter = routeParameters.options.Find("jsonp"); // JSONParameter = routeParameters.options.Find("jsonp");
if("" != routeParameters.jsonpParameter) { if(!routeParameters.jsonpParameter.empty()) {
reply.content += routeParameters.jsonpParameter; reply.content += routeParameters.jsonpParameter;
reply.content += "("; reply.content += "(";
} }
@ -81,7 +81,7 @@ public:
reply.content += ",\"transactionId\": \"OSRM Routing Engine JSON Locate (v0.3)\""; reply.content += ",\"transactionId\": \"OSRM Routing Engine JSON Locate (v0.3)\"";
reply.content += ("}"); reply.content += ("}");
reply.headers.resize(3); reply.headers.resize(3);
if("" != routeParameters.jsonpParameter) { if(!routeParameters.jsonpParameter.empty()) {
reply.content += ")"; reply.content += ")";
reply.headers[1].name = "Content-Type"; reply.headers[1].name = "Content-Type";
reply.headers[1].value = "text/javascript"; reply.headers[1].value = "text/javascript";