mirror of
https://github.com/derf/travelynx
synced 2024-12-04 02:09:09 +00:00
map: improve polyline duplicate detection
This commit is contained in:
parent
993f6be6c9
commit
dadb0f6637
1 changed files with 2 additions and 3 deletions
|
@ -488,8 +488,7 @@ sub map_history {
|
|||
next;
|
||||
}
|
||||
|
||||
my $key
|
||||
= $from_eva . '!' . $to_eva . '!' . $from_index . '!' . $to_index;
|
||||
my $key = $from_eva . '!' . $to_eva . '!' . ( $to_index - $from_index );
|
||||
|
||||
if ( $seen{$key} ) {
|
||||
next;
|
||||
|
@ -498,7 +497,7 @@ sub map_history {
|
|||
$seen{$key} = 1;
|
||||
|
||||
# direction does not matter at the moment
|
||||
$key = $to_eva . '!' . $from_eva . '!' . $to_index . '!' . $from_index;
|
||||
$key = $to_eva . '!' . $from_eva . '!' . ( $to_index - $from_index );
|
||||
$seen{$key} = 1;
|
||||
|
||||
@polyline = @polyline[ $from_index .. $to_index ];
|
||||
|
|
Loading…
Reference in a new issue