itinero / routing

The routing core of itinero.
Apache License 2.0
221 stars 69 forks source link

Duplicate code #8

Closed alecava58 closed 8 years ago

alecava58 commented 8 years ago

In the function IsVehicleAllowed located in src\Itinero\Osm\Vehicles\MotorVehicles.cs I think there is a duplicate code (see below), may I wrong?

/// <summary> 
/// Returns true if the vehicle is allowed on the way represented by these tags 
/// </summary> 
protected override bool IsVehicleAllowed(IAttributeCollection tags, string highwayType) 
{ 
  if (!tags.InterpretAccessValues(VehicleTypes, "access")) 
  { 
    return false; 
  } 
  if (!tags.InterpretAccessValues(VehicleTypes, "access")) 
  { 
    return false; 
  } 
  return AccessibleTags.ContainsKey(highwayType); 
} 
xivk commented 8 years ago

Hmm this looks weird indeed... fixing... :+1: