Skip to content

Commit

Permalink
Merge pull request #538 from mapbox/maxim/remove-excessive-logging
Browse files Browse the repository at this point in the history
Remove excessive logging from Intersection.
  • Loading branch information
MaximAlien authored Apr 21, 2021
2 parents 25fd495 + 5e3d3e2 commit 3f6636d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
binary "https://www.mapbox.com/ios-sdk/Mapbox-iOS-SDK.json" "5.9.0"
github "AliSoftware/OHHTTPStubs" "9.1.0"
github "Udumft/SwiftCLI" "da19d2a16cd5aa838d8fb7256e28c171bc67dd82"
github "mapbox/mapbox-events-ios" "v0.10.7"
github "mapbox/mapbox-events-ios" "v0.10.8"
github "mapbox/turf-swift" "v2.0.0-alpha.3"
github "raphaelmor/Polyline" "v5.0.2"
12 changes: 7 additions & 5 deletions Sources/MapboxDirections/Intersection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,20 +260,22 @@ extension Intersection: Codable {
try container.encode(outletArray, forKey: .outletIndexes)

var lanes: [Lane]?
print("lanes: \(String(describing: lanes))")
if let approachLanes = approachLanes,
let usableApproachLanes = usableApproachLanes,
let preferredApproachLanes = preferredApproachLanes
{
lanes = approachLanes.map { Lane(indications: $0) }
for i in usableApproachLanes {
lanes![i].isValid = true
if usableLaneIndication != nil && lanes![i].indications.descriptions.contains(usableLaneIndication!.rawValue) {
lanes![i].validIndication = usableLaneIndication
lanes?[i].isValid = true
if let usableLaneIndication = usableLaneIndication,
let validLanes = lanes,
validLanes[i].indications.descriptions.contains(usableLaneIndication.rawValue) {
lanes?[i].validIndication = usableLaneIndication
}
}

for j in preferredApproachLanes {
lanes![j].isActive = true
lanes?[j].isActive = true
}
}
try container.encodeIfPresent(lanes, forKey: .lanes)
Expand Down

0 comments on commit 3f6636d

Please sign in to comment.