Replace GCC-specific attribute with [[nodiscard]] attribute (#6899)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <numeric>
|
||||
#include <random>
|
||||
#include <string>
|
||||
|
||||
@@ -433,8 +433,7 @@ void suppressStep(RouteStep &step_at_turn_location, RouteStep &step_after_turn_l
|
||||
}
|
||||
|
||||
// OTHER IMPLEMENTATIONS
|
||||
OSRM_ATTR_WARN_UNUSED
|
||||
RouteSteps collapseTurnInstructions(RouteSteps steps)
|
||||
[[nodiscard]] RouteSteps collapseTurnInstructions(RouteSteps steps)
|
||||
{
|
||||
// make sure we can safely iterate over all steps (has depart/arrive with TurnType::NoTurn)
|
||||
BOOST_ASSERT(!hasTurnType(steps.front()) && !hasTurnType(steps.back()));
|
||||
@@ -589,8 +588,7 @@ RouteSteps collapseTurnInstructions(RouteSteps steps)
|
||||
}
|
||||
|
||||
// OTHER IMPLEMENTATIONS
|
||||
OSRM_ATTR_WARN_UNUSED
|
||||
RouteSteps collapseSegregatedTurnInstructions(RouteSteps steps)
|
||||
[[nodiscard]] RouteSteps collapseSegregatedTurnInstructions(RouteSteps steps)
|
||||
{
|
||||
// make sure we can safely iterate over all steps (has depart/arrive with TurnType::NoTurn)
|
||||
BOOST_ASSERT(!hasTurnType(steps.front()) && !hasTurnType(steps.back()));
|
||||
|
||||
Reference in New Issue
Block a user