Optimizing FB schema:
* Replaced Response union with nullable fields * "Ok" code replaced with a boolean and a separate structure for a error code and message. * Inlined geometry, thus removing one layer of indirection.
This commit is contained in:
@@ -71,8 +71,6 @@ class TableAPI final : public BaseAPI
|
||||
auto number_of_destinations = parameters.destinations.size();
|
||||
|
||||
fbresult::FBResultBuilder response(fb_result);
|
||||
response.add_code(fb_result.CreateString("Ok"));
|
||||
response.add_response_type(osrm::engine::api::fbresult::ServiceResponse::ServiceResponse_table);
|
||||
|
||||
fbresult::TableBuilder table(fb_result);
|
||||
|
||||
@@ -113,7 +111,7 @@ class TableAPI final : public BaseAPI
|
||||
{
|
||||
table.add_fallback_speed_cells(MakeEstimatesTable(fb_result, fallback_speed_cells));
|
||||
}
|
||||
|
||||
response.add_table(table.Finish());
|
||||
fb_result.Finish(response.Finish());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user