From f4906a97b9799eac773571e3899e46cf754c650b Mon Sep 17 00:00:00 2001 From: Dennis Luxen Date: Wed, 7 Aug 2013 14:01:56 +0200 Subject: [PATCH] pass const refs instead of copy --- Plugins/RouteParameters.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugins/RouteParameters.h b/Plugins/RouteParameters.h index c6dc5c544..e4455f839 100644 --- a/Plugins/RouteParameters.h +++ b/Plugins/RouteParameters.h @@ -56,8 +56,9 @@ struct RouteParameters { typedef HashTable::const_iterator OptionsIterator; void setZoomLevel(const short i) { - if (18 > i && 0 < i) + if (18 > i && 0 < i) { zoomLevel = i; + } } void setAlternateRouteFlag(const bool b) { @@ -105,12 +106,11 @@ struct RouteParameters { compression = b; } - void addCoordinate(boost::fusion::vector < double, double > arg_) { + void addCoordinate(const boost::fusion::vector < double, double > & arg_) { int lat = COORDINATE_PRECISION*boost::fusion::at_c < 0 > (arg_); int lon = COORDINATE_PRECISION*boost::fusion::at_c < 1 > (arg_); coordinates.push_back(_Coordinate(lat, lon)); } }; - #endif /*ROUTE_PARAMETERS_H*/