Don't pass by const-value for a read-only view.
I can't see a reason we pass by const-value here. Note: changes API because of the `route_parameters` header.
This commit is contained in:
parent
bed0598530
commit
db092c828e
@ -134,7 +134,7 @@ void RouteParameters::addCoordinate(
|
|||||||
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
|
static_cast<int>(COORDINATE_PRECISION * boost::fusion::at_c<1>(received_coordinates)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RouteParameters::getCoordinatesFromGeometry(const std::string geometry_string)
|
void RouteParameters::getCoordinatesFromGeometry(const std::string &geometry_string)
|
||||||
{
|
{
|
||||||
PolylineCompressor pc;
|
PolylineCompressor pc;
|
||||||
coordinates = pc.decode_string(geometry_string);
|
coordinates = pc.decode_string(geometry_string);
|
||||||
|
@ -345,8 +345,8 @@ class StaticRTree
|
|||||||
|
|
||||||
// Construct a packed Hilbert-R-Tree with Kamel-Faloutsos algorithm [1]
|
// Construct a packed Hilbert-R-Tree with Kamel-Faloutsos algorithm [1]
|
||||||
explicit StaticRTree(const std::vector<EdgeDataT> &input_data_vector,
|
explicit StaticRTree(const std::vector<EdgeDataT> &input_data_vector,
|
||||||
const std::string tree_node_filename,
|
const std::string &tree_node_filename,
|
||||||
const std::string leaf_node_filename,
|
const std::string &leaf_node_filename,
|
||||||
const std::vector<QueryNode> &coordinate_list)
|
const std::vector<QueryNode> &coordinate_list)
|
||||||
: m_element_count(input_data_vector.size()), m_leaf_node_filename(leaf_node_filename)
|
: m_element_count(input_data_vector.size()), m_leaf_node_filename(leaf_node_filename)
|
||||||
{
|
{
|
||||||
|
@ -79,7 +79,7 @@ struct RouteParameters
|
|||||||
|
|
||||||
void addCoordinate(const boost::fusion::vector<double, double> &received_coordinates);
|
void addCoordinate(const boost::fusion::vector<double, double> &received_coordinates);
|
||||||
|
|
||||||
void getCoordinatesFromGeometry(const std::string geometry_string);
|
void getCoordinatesFromGeometry(const std::string &geometry_string);
|
||||||
|
|
||||||
short zoom_level;
|
short zoom_level;
|
||||||
bool print_instructions;
|
bool print_instructions;
|
||||||
|
Loading…
Reference in New Issue
Block a user