Fixes signed/unsigned comparision spotted by gcc10.
Fixed by moving assertion to the actual point where signed values are used.
This commit is contained in:
parent
365121dac4
commit
919fe74c40
@ -192,17 +192,22 @@ void annotatePath(const FacadeT &facade,
|
|||||||
|
|
||||||
const bool is_first_segment = unpacked_path.empty();
|
const bool is_first_segment = unpacked_path.empty();
|
||||||
|
|
||||||
const std::size_t start_index =
|
std::size_t start_index = 0;
|
||||||
(is_first_segment ? ((start_traversed_in_reverse)
|
if (is_first_segment)
|
||||||
? weight_vector.size() -
|
{
|
||||||
phantom_node_pair.source_phantom.fwd_segment_position - 1
|
unsigned short segment_position = phantom_node_pair.source_phantom.fwd_segment_position;
|
||||||
: phantom_node_pair.source_phantom.fwd_segment_position)
|
if (start_traversed_in_reverse)
|
||||||
: 0);
|
{
|
||||||
|
segment_position = weight_vector.size() -
|
||||||
|
phantom_node_pair.source_phantom.fwd_segment_position - 1;
|
||||||
|
}
|
||||||
|
BOOST_ASSERT(segment_position >= 0);
|
||||||
|
start_index = static_cast<std::size_t>(segment_position);
|
||||||
|
}
|
||||||
const std::size_t end_index = weight_vector.size();
|
const std::size_t end_index = weight_vector.size();
|
||||||
|
|
||||||
bool is_left_hand_driving = facade.IsLeftHandDriving(node_id);
|
bool is_left_hand_driving = facade.IsLeftHandDriving(node_id);
|
||||||
|
|
||||||
BOOST_ASSERT(start_index >= 0);
|
|
||||||
BOOST_ASSERT(start_index < end_index);
|
BOOST_ASSERT(start_index < end_index);
|
||||||
for (std::size_t segment_idx = start_index; segment_idx < end_index; ++segment_idx)
|
for (std::size_t segment_idx = start_index; segment_idx < end_index; ++segment_idx)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user