Merge pull request #315 from danielpunkass/xcode9.3

Changes for Xcode9.3 / Swift 4.1
This commit is contained in:
Brent Simmons 2018-01-29 13:03:26 -08:00 committed by GitHub
commit 96e17afb5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 260 additions and 62 deletions

View File

@ -36,7 +36,7 @@ final class DeleteFromSidebarCommand: UndoableCommand {
self.undoActionName = actionName
self.undoManager = undoManager
let itemSpecifiers = nodesToDelete.flatMap{ SidebarItemSpecifier(node: $0) }
let itemSpecifiers = nodesToDelete.compactMap{ SidebarItemSpecifier(node: $0) }
guard !itemSpecifiers.isEmpty else {
return nil
}

View File

@ -1279,7 +1279,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software";
TargetAttributes = {
849C645F1ED37A5D003D8FC0 = {

View File

@ -19,7 +19,7 @@ final class MainWindowKeyboardHandler: KeyboardDelegate {
let f = Bundle.main.path(forResource: "GlobalKeyboardShortcuts", ofType: "plist")!
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
self.globalShortcuts = Set(rawShortcuts.flatMap { KeyboardShortcut(dictionary: $0) })
self.globalShortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
}
func keydown(_ event: NSEvent, in view: NSView) -> Bool {

View File

@ -332,7 +332,7 @@ extension MainWindowController: NSSharingServicePickerDelegate {
func sharingServicePicker(_ sharingServicePicker: NSSharingServicePicker, sharingServicesForItems items: [Any], proposedSharingServices proposedServices: [NSSharingService]) -> [NSSharingService] {
let sendToServices = appDelegate.sendToCommands.flatMap { (sendToCommand) -> NSSharingService? in
let sendToServices = appDelegate.sendToCommands.compactMap { (sendToCommand) -> NSSharingService? in
guard let object = items.first else {
return nil

View File

@ -19,7 +19,7 @@ import RSCore
let f = Bundle.main.path(forResource: "SidebarKeyboardShortcuts", ofType: "plist")!
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
self.shortcuts = Set(rawShortcuts.flatMap { KeyboardShortcut(dictionary: $0) })
self.shortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
super.init()
}

View File

@ -45,7 +45,7 @@ extension Array where Element == Article {
func articlesForIndexes(_ indexes: IndexSet) -> Set<Article> {
return Set(indexes.flatMap{ (oneIndex) -> Article? in
return Set(indexes.compactMap{ (oneIndex) -> Article? in
return articleAtRow(oneIndex)
})
}

View File

@ -21,7 +21,7 @@ import RSCore
let f = Bundle.main.path(forResource: "TimelineKeyboardShortcuts", ofType: "plist")!
let rawShortcuts = NSArray(contentsOfFile: f)! as! [[String: Any]]
self.shortcuts = Set(rawShortcuts.flatMap { KeyboardShortcut(dictionary: $0) })
self.shortcuts = Set(rawShortcuts.compactMap { KeyboardShortcut(dictionary: $0) })
super.init()
}

View File

@ -50,13 +50,13 @@ class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectConta
@objc(feeds)
var feeds:NSArray {
let feeds = account.children.flatMap { $0 as? Feed }
let feeds = account.children.compactMap { $0 as? Feed }
return feeds.map { ScriptableFeed($0, container:self) } as NSArray
}
@objc(folders)
var folders:NSArray {
let folders = account.children.flatMap { $0 as? Folder }
let folders = account.children.compactMap { $0 as? Folder }
return folders.map { ScriptableFolder($0, container:self) } as NSArray
}

View File

@ -36,7 +36,7 @@ extension NSApplication : ScriptingObjectContainer {
let accounts = AccountManager.shared.accounts
let emptyFeeds:[Feed] = []
let feeds = accounts.reduce(emptyFeeds) { (result, nthAccount) -> [Feed] in
let accountFeeds = nthAccount.children.flatMap { $0 as? Feed }
let accountFeeds = nthAccount.children.compactMap { $0 as? Feed }
return result + accountFeeds
}
return feeds.map { ScriptableFeed($0, container:self) } as NSArray

View File

@ -462,7 +462,7 @@ extension Account {
func objects(with diskObjects: [[String: Any]]) -> [AnyObject] {
return diskObjects.flatMap { object(with: $0) }
return diskObjects.compactMap { object(with: $0) }
}
}
@ -508,7 +508,7 @@ private extension Account {
func diskDictionary() -> NSDictionary {
let diskObjects = children.flatMap { (object) -> [String: Any]? in
let diskObjects = children.compactMap { (object) -> [String: Any]? in
if let folder = object as? Folder {
return folder.dictionary
@ -650,7 +650,7 @@ private extension Account {
func noteStatusesForArticlesDidChange(_ articles: Set<Article>) {
let feeds = Set(articles.flatMap { $0.feed })
let feeds = Set(articles.compactMap { $0.feed })
let statuses = Set(articles.map { $0.status })
// .UnreadCountDidChange notification will get sent to Folder and Account objects,

View File

@ -316,7 +316,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software, LLC";
TargetAttributes = {
848934F51F62484F00CEBD24 = {
@ -505,6 +505,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -512,6 +513,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -565,6 +567,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -572,6 +575,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -597,6 +601,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@ -607,6 +612,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
@ -631,6 +637,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
@ -654,6 +661,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = M8L2WTLA8W;
@ -669,6 +677,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = M8L2WTLA8W;

View File

@ -90,7 +90,7 @@ struct FeedbinArticle {
static func articles(with array: JSONArray) -> [FeedbinArticle]? {
let articlesArray = array.flatMap { FeedbinArticle(jsonDictionary: $0) }
let articlesArray = array.compactMap { FeedbinArticle(jsonDictionary: $0) }
return articlesArray.isEmpty ? nil : articlesArray
}
}

View File

@ -64,7 +64,7 @@ struct FeedbinSubscription {
static func subscriptions(with array: JSONArray) -> [FeedbinSubscription]? {
let subs = array.flatMap { FeedbinSubscription(dictionary: $0) }
let subs = array.compactMap { FeedbinSubscription(dictionary: $0) }
return subs.isEmpty ? nil : subs
}
}

View File

@ -107,7 +107,7 @@ public final class Folder: DisplayNameProvider, Container, UnreadCountProvider,
d[Key.unreadCount] = unreadCount
}
let childObjects = children.flatMap { (child) -> [String: Any]? in
let childObjects = children.compactMap { (child) -> [String: Any]? in
if let feed = child as? Feed {
return feed.dictionary

View File

@ -148,7 +148,7 @@
84F22BC81B52DC2E000060CE /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software, LLC";
TargetAttributes = {
84F22BD01B52DC2E000060CE = {
@ -237,12 +237,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -290,12 +292,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -328,6 +332,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -348,6 +353,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -367,6 +373,7 @@
84F22BE91B52DC2E000060CE /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = DB5Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
@ -379,6 +386,7 @@
84F22BEA1B52DC2E000060CE /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = DB5Tests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";

View File

@ -84,7 +84,7 @@ public struct Author: Hashable {
static func authorsWithDiskArray(_ diskArray: [[String: Any]]) -> Set<Author>? {
let authors = diskArray.flatMap { Author(dictionary: $0) }
let authors = diskArray.compactMap { Author(dictionary: $0) }
return authors.isEmpty ? nil : Set(authors)
}
}

View File

@ -199,7 +199,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software";
TargetAttributes = {
844BEE5A1F0AB3C8004AB7CD = {
@ -328,6 +328,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -335,6 +336,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -389,6 +391,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -396,6 +399,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -420,6 +424,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
@ -432,6 +437,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -454,6 +460,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -475,6 +482,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = DataTests/Info.plist;
@ -488,6 +496,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = DataTests/Info.plist;

View File

@ -325,7 +325,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software";
TargetAttributes = {
844BEE361F0AB3AA004AB7CD = {
@ -526,6 +526,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -533,6 +534,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -587,6 +589,7 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
@ -594,6 +597,7 @@
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -618,6 +622,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
@ -630,6 +635,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -652,6 +658,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -673,6 +680,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = DatabaseTests/Info.plist;
@ -686,6 +694,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = DatabaseTests/Info.plist;

View File

@ -159,7 +159,7 @@ extension Set where Element == Article {
func databaseDictionaries() -> [NSDictionary]? {
return self.flatMap { $0.databaseDictionary() }
return self.compactMap { $0.databaseDictionary() }
}
}

View File

@ -39,7 +39,7 @@ extension Attachment {
return nil
}
let attachments = parsedAttachments.flatMap{ Attachment(parsedAttachment: $0) }
let attachments = parsedAttachments.compactMap{ Attachment(parsedAttachment: $0) }
return attachments.isEmpty ? nil : Set(attachments)
}
@ -91,11 +91,11 @@ extension Set where Element == Attachment {
func databaseDictionaries() -> [NSDictionary] {
return self.flatMap { $0.databaseDictionary() }
return self.compactMap { $0.databaseDictionary() }
}
func databaseObjects() -> [DatabaseObject] {
return self.flatMap { $0 as DatabaseObject }
return self.compactMap { $0 as DatabaseObject }
}
}

View File

@ -37,7 +37,7 @@ extension Author {
return nil
}
let authors = Set(parsedAuthors.flatMap { Author(parsedAuthor: $0) })
let authors = Set(parsedAuthors.compactMap { Author(parsedAuthor: $0) })
return authors.isEmpty ? nil: authors
}
}

View File

@ -624,7 +624,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software, LLC";
TargetAttributes = {
842DD7BB1E14993900E061EB = {
@ -820,6 +820,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -849,6 +850,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -1011,6 +1013,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
@ -1028,6 +1031,7 @@
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1051,6 +1055,7 @@
CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES;
CLANG_ANALYZER_SECURITY_INSECUREAPI_STRCPY = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1070,6 +1075,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",
@ -1090,6 +1096,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(DEVELOPER_FRAMEWORKS_DIR)",

View File

@ -17,7 +17,7 @@ public extension NSOutlineView {
return [AnyObject]()
}
return selectedRowIndexes.flatMap { (oneIndex) -> AnyObject? in
return selectedRowIndexes.compactMap { (oneIndex) -> AnyObject? in
return item(atRow: oneIndex) as AnyObject
}
}

View File

@ -95,7 +95,7 @@ public extension DatabaseTable {
public extension FMResultSet {
public func flatMap<T>(_ callback: (_ row: FMResultSet) -> T?) -> [T] {
public func compactMap<T>(_ callback: (_ row: FMResultSet) -> T?) -> [T] {
var objects = [T]()
while next() {
@ -109,7 +109,7 @@ public extension FMResultSet {
public func mapToSet<T>(_ callback: (_ row: FMResultSet) -> T?) -> Set<T> {
return Set(flatMap(callback))
return Set(compactMap(callback))
}
}

View File

@ -47,11 +47,6 @@
return self;
}
- (void)finalize {
[self close];
[super finalize];
}
- (void)dealloc {
[self close];
FMDBRelease(_openResultSets);
@ -1398,11 +1393,6 @@ void FMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3
@synthesize useCount=_useCount;
@synthesize inUse=_inUse;
- (void)finalize {
[self close];
[super finalize];
}
- (void)dealloc {
[self close];
FMDBRelease(_query);

View File

@ -25,11 +25,6 @@
return FMDBReturnAutoreleased(rs);
}
- (void)finalize {
[self close];
[super finalize];
}
- (void)dealloc {
[self close];

View File

@ -307,7 +307,7 @@
84F22C4C1B52E0D9000060CE /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software, LLC";
TargetAttributes = {
8400ABF61E0CFBD800AA7C57 = {
@ -430,6 +430,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -457,6 +458,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_NONNULL = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -494,12 +496,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -550,12 +554,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -579,6 +585,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
@ -591,6 +598,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -612,6 +620,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -632,6 +641,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSDatabaseTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
@ -645,6 +655,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSDatabaseTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";

View File

@ -53,7 +53,7 @@ extension Array where Element == DatabaseObject {
func databaseDictionaries() -> [NSDictionary]? {
let dictionaries = self.flatMap{ $0.databaseDictionary() }
let dictionaries = self.compactMap{ $0.databaseDictionary() }
return dictionaries.isEmpty ? nil : dictionaries
}
}

View File

@ -60,7 +60,7 @@ public extension DatabaseRelatedObjectsTable {
func objectsWithResultSet(_ resultSet: FMResultSet) -> [DatabaseObject] {
return resultSet.flatMap(objectWithRow)
return resultSet.compactMap(objectWithRow)
}
func save(_ objects: [DatabaseObject], in database: FMDatabase) {

View File

@ -23,7 +23,7 @@ public struct RelatedObjectsMap {
for objectID in relatedObjectIDsMap.objectIDs() {
if let relatedObjectIDs = relatedObjectIDsMap[objectID] {
let relatedObjects = relatedObjectIDs.flatMap{ relatedObjectsDictionary[$0] }
let relatedObjects = relatedObjectIDs.compactMap{ relatedObjectsDictionary[$0] }
if !relatedObjects.isEmpty {
d[objectID] = relatedObjects
}

View File

@ -189,7 +189,7 @@
84BAAE161C8E6B3B009F5239 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software";
TargetAttributes = {
84BAAE1E1C8E6B3B009F5239 = {
@ -285,12 +285,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -341,12 +343,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -371,6 +375,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
@ -383,6 +388,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -403,6 +409,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -422,6 +429,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSFeedFinderTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
@ -435,6 +443,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSFeedFinderTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";

View File

@ -103,7 +103,7 @@ private extension JSONFeedParser {
return nil
}
let hubs = hubsArray.flatMap { (hubDictionary) -> ParsedHub? in
let hubs = hubsArray.compactMap { (hubDictionary) -> ParsedHub? in
guard let hubURL = hubDictionary[Key.url] as? String, let hubType = hubDictionary[Key.type] as? String else {
return nil
}
@ -114,7 +114,7 @@ private extension JSONFeedParser {
static func parseItems(_ itemsArray: JSONArray, _ feedURL: String) -> Set<ParsedItem> {
return Set(itemsArray.flatMap { (oneItemDictionary) -> ParsedItem? in
return Set(itemsArray.compactMap { (oneItemDictionary) -> ParsedItem? in
return parseItem(oneItemDictionary, feedURL)
})
}
@ -180,7 +180,7 @@ private extension JSONFeedParser {
guard let attachmentsArray = itemDictionary[Key.attachments] as? JSONArray else {
return nil
}
return Set(attachmentsArray.flatMap { parseAttachment($0) })
return Set(attachmentsArray.compactMap { parseAttachment($0) })
}
static func parseAttachment(_ attachmentObject: JSONDictionary) -> ParsedAttachment? {

View File

@ -60,7 +60,7 @@ private extension RSSInJSONParser {
static func parseItems(_ itemsObject: JSONArray, _ feedURL: String) -> Set<ParsedItem> {
return Set(itemsObject.flatMap{ (oneItemDictionary) -> ParsedItem? in
return Set(itemsObject.compactMap{ (oneItemDictionary) -> ParsedItem? in
return parsedItemWithDictionary(oneItemDictionary, feedURL)
})
@ -150,7 +150,7 @@ private extension RSSInJSONParser {
return nil
}
else if let categoryArray = itemDictionary["category"] as? JSONArray {
return Set(categoryArray.flatMap{ $0["#value"] as? String })
return Set(categoryArray.compactMap{ $0["#value"] as? String })
}
return nil
}

View File

@ -52,7 +52,7 @@ private extension RSParsedFeedTransformer {
return nil
}
let transformedAuthors = authors.flatMap { (author) -> ParsedAuthor? in
let transformedAuthors = authors.compactMap { (author) -> ParsedAuthor? in
return ParsedAuthor(name: author.name, url: author.url, avatarURL: nil, emailAddress: author.emailAddress)
}
@ -65,7 +65,7 @@ private extension RSParsedFeedTransformer {
return nil
}
let attachments = enclosures.flatMap { (enclosure) -> ParsedAttachment? in
let attachments = enclosures.compactMap { (enclosure) -> ParsedAttachment? in
let sizeInBytes = enclosure.length > 0 ? enclosure.length : nil
return ParsedAttachment(url: enclosure.url, mimeType: enclosure.mimeType, title: nil, sizeInBytes: sizeInBytes, durationInSeconds: nil)

View File

@ -541,7 +541,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software, LLC";
TargetAttributes = {
84FF5F831EFA285800C15A01 = {
@ -846,6 +846,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
@ -859,6 +860,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -883,6 +885,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -907,6 +910,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = M8L2WTLA8W;
INFOPLIST_FILE = RSParserTests/Info.plist;
@ -923,6 +927,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = M8L2WTLA8W;
INFOPLIST_FILE = RSParserTests/Info.plist;

View File

@ -6,6 +6,7 @@
// Copyright (c) 2015 Ranchero Software, LLC. All rights reserved.
//
#import <libxml/parser.h>
#import <libxml/tree.h>
#import <libxml/xmlstring.h>
#import <RSParser/RSSAXParser.h>

View File

@ -178,7 +178,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software";
TargetAttributes = {
8439D9FA1C8937C800E5E4B4 = {
@ -270,12 +270,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -324,12 +326,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -363,6 +367,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -384,6 +389,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -403,6 +409,7 @@
8439DA131C8937C800E5E4B4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSTextDrawingTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
@ -415,6 +422,7 @@
8439DA141C8937C800E5E4B4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSTextDrawingTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";

View File

@ -150,7 +150,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software, LLC";
TargetAttributes = {
842A0BE01CFCB9BC00BF746C = {
@ -243,12 +243,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -301,12 +303,14 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@ -331,6 +335,7 @@
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
@ -343,6 +348,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -363,6 +369,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
@ -375,6 +382,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ranchero.RSTree;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
};
name = Release;
@ -382,6 +390,7 @@
842A0BF91CFCB9BC00BF746C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSTreeTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
@ -393,6 +402,7 @@
842A0BFA1CFCB9BC00BF746C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = RSTreeTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";

View File

@ -299,7 +299,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0920;
LastUpgradeCheck = 0930;
ORGANIZATIONNAME = "Ranchero Software";
TargetAttributes = {
849C08B51E0CAC85006B03FA = {
@ -590,6 +590,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
RUN_CLANG_STATIC_ANALYZER = YES;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES;
@ -603,6 +604,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -625,6 +627,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
@ -646,6 +649,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = RSWebTests/Info.plist;
@ -659,6 +663,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = 9C84TZ7Q6Z;
INFOPLIST_FILE = RSWebTests/Info.plist;
@ -672,6 +677,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
@ -696,6 +702,7 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;

View File

@ -56,7 +56,7 @@ struct FeedsImporter {
private static func feeds(with feedDictionaries: [DiskFeedDictionary], accountID: String) -> Set<Feed> {
let feedArray = feedDictionaries.flatMap { Feed(accountID: accountID, dictionary: $0) }
let feedArray = feedDictionaries.compactMap { Feed(accountID: accountID, dictionary: $0) }
return Set(feedArray)
}
}

117
test.html Normal file
View File

@ -0,0 +1,117 @@
<html>
<head>
<title></title>
<base target="bottom">
<style TYPE="text/css">
<!--
CAPTION { font-family: Arial,Helvetica,sans-serif; padding: 0.25em 0 0 0; }
TD, TH { font-family: Arial,Helvetica,sans-serif; font-size: 9pt; padding-left: 0.5em; padding-right: 0.5em; }
#T1 TH { border-bottom: solid 1px #808080; }
#T1 TD { border-bottom: solid 1px #cccccc; }
#T1 TD A { text-decoration: none; }
#T1 TD A:hover { text-decoration: underline; }
@media print {
TD, TH { font-size: 8pt; }
}
-->
</style>
</head>
<body>
<!-- SELECT rptBankerTrades.AccountNumber as AccountNumber , rptBankerTrades.ParcelID as ParcelID , Owner1 , Owner2 , Owner3 , StreetName , [Street#] , [AltStreet#] , BuildType , BuildType2 , BuildType3 , YearBuilt , Bedrooms , Fullbaths , TotalAcres , LegalRefDate , SalePrice , LegalReference , FinArea , rptBankerTrades.LUC as LUC , TotalValue , DataProperty.NBC as Neighborhood , TableLandUse.Description as LandUseDescription FROM rptBankerTrades LEFT OUTER JOIN DataProperty ON DataProperty.AccountNumber = rptBankerTrades.AccountNumber AND DataProperty.CardNumber = 1 LEFT OUTER JOIN TableLandUse ON TableLandUse.Code = rptBankerTrades.LUC WHERE 1 = 1 AND StreetName LIKE 'freeman%' AND [Street#] LIKE '30%' ORDER BY StreetName, [Street#], rptBankerTrades.ParcelID --><table width='100%'>
<tr><td width='15%' align='left'></td>
<td width='15%' align='left'></td>
<td width='40%' align='center'><a href='#' target='bottom'><span onClick='window.print();'>Print page 1 of 1</span></a></td>
<td width='15%' align='right'></td>
<td width='15%' align='right'></td>
</tr>
</table>
<TABLE ID="T1" ONSELECTSTART="return false" WIDTH=100% border="0" cellspacing="0" cellpadding="0">
<caption>
<B>
Click on the Column Headings to sort accordingly.<br>
Click on the Parcel ID to view the parcel detail.<br>&nbsp;
</B>
</caption>
<THEAD>
<TR valign='bottom'>
<TH align='left' ><A HREF="SearchResults.asp?Sort=Parcel" target="bottom">Parcel ID</A></TH>
<TH align='left' ><A HREF="SearchResults.asp?Sort=Street" target="bottom">Location</A></TH>
<TH align='left' ><A HREF="SearchResults.asp?Sort=Owner" target="bottom">Owner</A></TH>
<TH align='left' ><A HREF="SearchResults.asp?Sort=YearBuilt" target="bottom">Built</A><BR>
<A HREF="SearchResults.asp?Sort=BuildingType" target="bottom">Type</A></TD>
<TH align='right' ><A HREF="SearchResults.asp?Sort=TotalValue" target="bottom">Total Value</A></TD>
<TH align='center' ><A HREF="SearchResults.asp?Sort=Bedrooms" target="bottom">Beds</A><br>
<A HREF="SearchResults.asp?Sort=Bathrooms" target="bottom">Baths</A></TH>
<TH align='right' nowrap><A HREF="SearchResults.asp?Sort=LotSize" target="bottom">Lot size</A><br>
<A HREF="SearchResults.asp?Sort=FinArea" target="bottom">Fin area</A></TH>
<TH align='left' ><A HREF="SearchResults.asp?Sort=LUC" target="bottom">LUC</A><br>
<A HREF="SearchResults.asp?Sort=LUCDescription" target="bottom">Description</A></TH>
<TH align='center' ><A HREF="SearchResults.asp?Sort=Neighborhood" target="bottom">NHood</A></TH>
<TH align='right' ><A HREF="SearchResults.asp?Sort=SaleDate" target="bottom">Sale date</A><br>
<A HREF="SearchResults.asp?Sort=SalePrice" target="bottom">Sale price</A></TH>
<TH align='left' ><A HREF="SearchResults.asp?Sort=LegalRef" target="bottom">Book Page</A></TH>
</TR>
</THEAD>
<TBODY>
<TR valign='top'>
<TD><A HREF="Summary.asp?AccountNumber=600" target="_top">006.0-0005-0003.0</A></TD>
<TD>30&nbsp;
<A HREF="SearchResults.asp?SearchStreetName=FREEMAN+ST" target="bottom">FREEMAN ST</A></TD>
<TD><A HREF="SearchResults.asp?SearchOwner=PITCHEL+STUART" target="bottom">PITCHEL STUART</A>
<br><A HREF="SearchResults.asp?SearchOwner=GOODMAN+JULIA" target="bottom">GOODMAN JULIA</A></TD>
<TD><A HREF='SearchResults.asp?SearchYearBuilt=1914&amp;SearchYearBuiltThru=1914' target='bottom'>1914</A><br>
<A HREF="SearchResults.asp?SearchBuildingType=Old+Style" target="bottom">Old Style</A>
&nbsp;</TD>
<TD align='right'>$615,400</TD>
<TD align='center'>5<br>
3</TD>
<TD align='right'>5,502
<br>2,472</TD>
<TD align='left'><A HREF="SearchResults.asp?SearchLUC=101&amp;SearchLUCDescription=One+Family" target="bottom">101</a><br>
<A HREF="SearchResults.asp?SearchLUC=101&amp;SearchLUCDescription=One+Family" target="bottom">One Family</a></TD>
<TD align='center'><A HREF="SearchResults.asp?SearchNeighborhood=1" target="bottom">1</A></TD>
<TD align='right'>8/19/<A HREF='SearchResults.asp?SearchSaleDate=01%2f01%2f1998&amp;SearchSaleDateThru=12%2f31%2f1998' target='bottom'>1998</A><br>
$299,000</TD>
<TD>28988-522</TD>
</TR>
</TBODY>
</TABLE>
<table width='100%'>
<tr><td width='15%' align='left'></td>
<td width='15%' align='left'></td>
<td width='40%' align='center'><a href='#' target='bottom'><span onClick='window.print();'>Print page 1 of 1</span></a></td>
<td width='15%' align='right'></td>
<td width='15%' align='right'></td>
</tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-4142258-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</body>
</html>

View File

@ -8,8 +8,10 @@ CLANG_CXX_LANGUAGE_STANDARD = gnu++0x
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
CLANG_ENABLE_OBJC_WEAK = YES
ENABLE_STRICT_OBJC_MSGSEND = YES
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES
CLANG_WARN_DOCUMENTATION_COMMENTS = YES
CLANG_WARN_EMPTY_BODY = YES
CLANG_WARN_BOOL_CONVERSION = YES
@ -33,6 +35,7 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES
GCC_WARN_UNDECLARED_SELECTOR = YES
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
CLANG_ANALYZER_NONNULL = YES
SWIFT_SWIFT3_OBJC_INFERENCE = Off
SWIFT_VERSION = 4.0