Silence unused variable warnings

This commit is contained in:
Daniel J. Hofmann 2015-09-04 18:23:57 +02:00
parent 72c0feb048
commit 17d8e65c64
7 changed files with 11 additions and 3 deletions

View File

@ -73,6 +73,8 @@ std::vector<NodeID> BruteForceTrip(const NodeIDIterator start,
const std::size_t number_of_locations, const std::size_t number_of_locations,
const DistTableWrapper<EdgeWeight> &dist_table) const DistTableWrapper<EdgeWeight> &dist_table)
{ {
(void)number_of_locations; // unused
const auto component_size = std::distance(start, end); const auto component_size = std::distance(start, end);
std::vector<NodeID> perm(start, end); std::vector<NodeID> perm(start, end);
@ -103,4 +105,4 @@ std::vector<NodeID> BruteForceTrip(const NodeIDIterator start,
} // end namespace trip } // end namespace trip
} // end namespace osrm } // end namespace osrm
#endif // TRIP_BRUTE_FORCE_HPP #endif // TRIP_BRUTE_FORCE_HPP

View File

@ -54,6 +54,7 @@ GetShortestRoundTrip(const NodeID new_loc,
const std::size_t number_of_locations, const std::size_t number_of_locations,
std::vector<NodeID> &route) std::vector<NodeID> &route)
{ {
(void)number_of_locations; // unused
auto min_trip_distance = INVALID_EDGE_WEIGHT; auto min_trip_distance = INVALID_EDGE_WEIGHT;
NodeIDIter next_insert_point_candidate; NodeIDIter next_insert_point_candidate;

View File

@ -295,7 +295,6 @@ template <class DataFacadeT> class JSONDescriptor final : public BaseDescriptor<
std::vector<Segment> &route_segments_list) const std::vector<Segment> &route_segments_list) const
{ {
osrm::json::Array json_instruction_array; osrm::json::Array json_instruction_array;
// Segment information has following format: // Segment information has following format:
//["instruction id","streetname",length,position,time,"length","earth_direction",azimuth] //["instruction id","streetname",length,position,time,"length","earth_direction",azimuth]
unsigned necessary_segments_running_index = 0; unsigned necessary_segments_running_index = 0;

View File

@ -78,6 +78,8 @@ template <class DataFacadeT> class MapMatchingPlugin : public BasePlugin
TraceClassification TraceClassification
classify(const float trace_length, const float matched_length, const int removed_points) const classify(const float trace_length, const float matched_length, const int removed_points) const
{ {
(void)removed_points; // unused
const double distance_feature = -std::log(trace_length) + std::log(matched_length); const double distance_feature = -std::log(trace_length) + std::log(matched_length);
// matched to the same point // matched to the same point

View File

@ -47,6 +47,8 @@ template <class DataFacadeT> class TimestampPlugin final : public BasePlugin
int HandleRequest(const RouteParameters &route_parameters, int HandleRequest(const RouteParameters &route_parameters,
osrm::json::Object &json_result) override final osrm::json::Object &json_result) override final
{ {
(void)route_parameters; // unused
json_result.values["status"] = 0; json_result.values["status"] = 0;
const std::string timestamp = facade->GetTimestamp(); const std::string timestamp = facade->GetTimestamp();
json_result.values["timestamp"] = timestamp; json_result.values["timestamp"] = timestamp;

View File

@ -62,6 +62,8 @@ class DirectShortestPathRouting final
const std::vector<bool> &uturn_indicators, const std::vector<bool> &uturn_indicators,
InternalRouteResult &raw_route_data) const InternalRouteResult &raw_route_data) const
{ {
(void)uturn_indicators; // unused
engine_working_data.InitializeOrClearFirstThreadLocalStorage( engine_working_data.InitializeOrClearFirstThreadLocalStorage(
super::facade->GetNumberOfNodes()); super::facade->GetNumberOfNodes());
engine_working_data.InitializeOrClearSecondThreadLocalStorage( engine_working_data.InitializeOrClearSecondThreadLocalStorage(

View File

@ -98,7 +98,7 @@ Function for_each_pair(ContainerT &container, Function function)
return for_each_pair(std::begin(container), std::end(container), function); return for_each_pair(std::begin(container), std::end(container), function);
} }
template <class Container> void append_to_container(Container &&a) {} template <class Container> void append_to_container(Container &&) {}
template <class Container, typename T, typename... Args> template <class Container, typename T, typename... Args>
void append_to_container(Container &&container, T value, Args &&... args) void append_to_container(Container &&container, T value, Args &&... args)