Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: FavIcon/FavIcon.swift

Issue 29664569: Favicon: Issue 6245 - SwiftLinted project files (Closed)
Left Patch Set: Favicon: Issue 6245 - Swiftlinted project files Created Jan. 16, 2018, 12:55 p.m.
Right Patch Set: Removed the sorted_imports rule and reversed the import calls to be sorted alphabetically Created Feb. 19, 2018, 10:38 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « FavIcon/DetectedIcon.swift ('k') | FavIcon/IconExtraction.swift » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // 1 //
2 // FavIcon 2 // FavIcon
3 // Copyright © 2016 Leon Breedt 3 // Copyright © 2016 Leon Breedt
4 // 4 //
5 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // Licensed under the Apache License, Version 2.0 (the "License");
6 // you may not use this file except in compliance with the License. 6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at 7 // You may obtain a copy of the License at
8 // 8 //
9 // http://www.apache.org/licenses/LICENSE-2.0 9 // http://www.apache.org/licenses/LICENSE-2.0
10 // 10 //
11 // Unless required by applicable law or agreed to in writing, software 11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS, 12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and 14 // See the License for the specific language governing permissions and
15 // limitations under the License. 15 // limitations under the License.
16 // 16 //
17 17
18 // swiftlint:disable file_length 18 // swiftlint:disable file_length
19 19
20 import Foundation 20 import Foundation
21
21 #if os(iOS) 22 #if os(iOS)
d108 2018/02/13 21:48:44 Swiftlint detects these imports out of order and p
22 import UIKit 23 import UIKit
23 /// Alias for the iOS image type (`UIImage`). 24 /// Alias for the iOS image type (`UIImage`).
24 public typealias ImageType = UIImage 25 public typealias ImageType = UIImage
25 #elseif os(OSX) 26 #elseif os(OSX)
26 import Cocoa 27 import Cocoa
27 /// Alias for the OS X image type (`NSImage`). 28 /// Alias for the OS X image type (`NSImage`).
28 public typealias ImageType = NSImage 29 public typealias ImageType = NSImage
29 #endif 30 #endif
30 31
31 /// Represents the result of attempting to download an icon. 32 /// Represents the result of attempting to download an icon.
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 401
401 extension DetectedIcon { 402 extension DetectedIcon {
402 /// The area of a detected icon, if known. 403 /// The area of a detected icon, if known.
403 var area: Int? { 404 var area: Int? {
404 if let width = width, let height = height { 405 if let width = width, let height = height {
405 return width * height 406 return width * height
406 } 407 }
407 return nil 408 return nil
408 } 409 }
409 } 410 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld