Parsing hints from request. If no hint is given, then it is initialized

to empty string.
This commit is contained in:
DennisOSRM
2012-03-05 16:19:46 +01:00
parent c273351d4a
commit f7cc34c807
2 changed files with 2 additions and 8 deletions
+1 -7
View File
@@ -85,13 +85,7 @@ public:
}
} else if("hint" == p) {
routeParameters.hints.resize(routeParameters.viaPoints.size(), 0);
if(routeParameters.hints.size()) {
unsigned hint = 0;
try {
hint = 10*boost::lexical_cast<int>(o);
} catch(boost::bad_lexical_cast &) { /* do nothing since hint is initialized to 0 */}
routeParameters.hints.back() = hint;
}
routeParameters.hints.back() = o;
} else {
routeParameters.options.Set(p, o);
}