Parsing hints from request. If no hint is given, then it is initialized
to empty string.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user