Skip to content

Commit

Permalink
Merge pull request hyperoslo#401 from jadar/master
Browse files Browse the repository at this point in the history
 Fix build by making code succeed linting.
  • Loading branch information
vadymmarkov authored Jun 1, 2018
2 parents 71aa8d1 + f32b00b commit ae6c9e0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
11 changes: 5 additions & 6 deletions Source/ImageGallery/ImageGalleryLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ class ImageGalleryLayout: UICollectionViewFlowLayout {
return super.layoutAttributesForElements(in: rect)
}

var newAttributes = [UICollectionViewLayoutAttributes]()
for attribute in attributes {
let newAttributes = attributes.map({ (attribute) -> UICollectionViewLayoutAttributes in
// swiftlint:disable force_cast
let n = attribute.copy() as! UICollectionViewLayoutAttributes
n.transform = configuration.rotationTransform
newAttributes.append(n)
}
let newAttribute = attribute.copy() as! UICollectionViewLayoutAttributes
newAttribute.transform = configuration.rotationTransform
return newAttribute
})

return newAttributes
}
Expand Down
5 changes: 3 additions & 2 deletions Source/ImageGallery/ImageGalleryView.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import UIKit
import Photos

private func < <T: Comparable>(lhs: T?, rhs: T?) -> Bool {
switch (lhs, rhs) {
case let (l?, r?):
return l < r
case let (someLhs?, someRhs?):
return someLhs < someRhs
case (nil, _?):
return true
default:
Expand Down

0 comments on commit ae6c9e0

Please sign in to comment.