https://github.com/Project-OSRM/osrm-backend/pull/2685/files fixes an issue where we did elongate(fstStep, sndStep); instead of newStep = elongate(fstStep, sndStep); we didn't get any warnings. The only way to trigger a warning here is to use ```cpp __attribute__((warn_unused_result)) ``` This changeset does exactly that: for the new guidance code prone to these kind of issue we add such an attribute to the declaration.
27 lines
654 B
C++
27 lines
654 B
C++
#ifndef OSRM_EXTRACTOR_GUIDANCE_TURN_LANE_AUGMENTATION_HPP_
|
|
#define OSRM_EXTRACTOR_GUIDANCE_TURN_LANE_AUGMENTATION_HPP_
|
|
|
|
#include "extractor/guidance/intersection.hpp"
|
|
#include "extractor/guidance/turn_lane_data.hpp"
|
|
#include "util/attributes.hpp"
|
|
|
|
namespace osrm
|
|
{
|
|
namespace extractor
|
|
{
|
|
namespace guidance
|
|
{
|
|
namespace lanes
|
|
{
|
|
|
|
OSRM_ATTR_WARN_UNUSED
|
|
LaneDataVector handleNoneValueAtSimpleTurn(LaneDataVector lane_data,
|
|
const Intersection &intersection);
|
|
|
|
} // namespace lanes
|
|
} // namespace guidance
|
|
} // namespace extractor
|
|
} // namespace osrm
|
|
|
|
#endif /* OSRM_EXTRACTOR_GUIDANCE_TURN_LANE_AUGMENTATION_HPP_ */
|