Update to Swift 5.0
This commit is contained in:
parent
eba0eec371
commit
28df34d300
|
@ -109,7 +109,7 @@
|
|||
OBJ_9 /* Atomic.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Atomic.swift; sourceTree = "<group>"; };
|
||||
"Schedule::Schedule::Product" /* Schedule.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Schedule.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
"Schedule::ScheduleDemo::Product" /* ScheduleDemo */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; path = ScheduleDemo; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
"Schedule::ScheduleTests::Product" /* ScheduleTests.xctest */ = {isa = PBXFileReference; lastKnownFileType = file; path = ScheduleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
"Schedule::ScheduleTests::Product" /* ScheduleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; path = ScheduleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
@ -318,12 +318,24 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 9999;
|
||||
TargetAttributes = {
|
||||
"Schedule::Schedule" = {
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
"Schedule::ScheduleDemo" = {
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
"Schedule::ScheduleTests" = {
|
||||
LastSwiftMigration = 1020;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = OBJ_2 /* Build configuration list for PBXProject "Schedule" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
);
|
||||
mainGroup = OBJ_5;
|
||||
|
@ -485,7 +497,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGET_NAME = Schedule;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 3.0;
|
||||
|
@ -513,7 +525,7 @@
|
|||
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGET_NAME = Schedule;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 3.0;
|
||||
|
@ -537,7 +549,7 @@
|
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
|
||||
SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES;
|
||||
SWIFT_FORCE_STATIC_LINK_STDLIB = NO;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGET_NAME = ScheduleDemo;
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -559,7 +571,7 @@
|
|||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
|
||||
SWIFT_FORCE_DYNAMIC_LINK_STDLIB = YES;
|
||||
SWIFT_FORCE_STATIC_LINK_STDLIB = NO;
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGET_NAME = ScheduleDemo;
|
||||
};
|
||||
name = Release;
|
||||
|
@ -605,13 +617,17 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = Schedule.xcodeproj/ScheduleTests_Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGET_NAME = ScheduleTests;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -626,13 +642,17 @@
|
|||
);
|
||||
HEADER_SEARCH_PATHS = "$(inherited)";
|
||||
INFOPLIST_FILE = Schedule.xcodeproj/ScheduleTests_Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @loader_path/../Frameworks @loader_path/Frameworks";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.12;
|
||||
OTHER_CFLAGS = "$(inherited)";
|
||||
OTHER_LDFLAGS = "$(inherited)";
|
||||
OTHER_SWIFT_FLAGS = "$(inherited)";
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)";
|
||||
SWIFT_VERSION = 4.2;
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGET_NAME = ScheduleTests;
|
||||
TVOS_DEPLOYMENT_TARGET = 10.0;
|
||||
WATCHOS_DEPLOYMENT_TARGET = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
@ -48,11 +48,6 @@ extension Interval {
|
|||
|
||||
extension Interval: Hashable {
|
||||
|
||||
/// The hashValue of this interval.
|
||||
public var hashValue: Int {
|
||||
return nanoseconds.hashValue
|
||||
}
|
||||
|
||||
/// Returns a boolean value indicating whether two intervals are equal.
|
||||
public static func == (lhs: Interval, rhs: Interval) -> Bool {
|
||||
return lhs.nanoseconds == rhs.nanoseconds
|
||||
|
|
|
@ -306,9 +306,9 @@ open class Task {
|
|||
|
||||
extension Task: Hashable {
|
||||
|
||||
/// The task's hash value.
|
||||
public var hashValue: Int {
|
||||
return ObjectIdentifier(self).hashValue
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(ObjectIdentifier(self))
|
||||
}
|
||||
|
||||
/// Returns a boolean value indicating whether two tasks are equal.
|
||||
|
|
|
@ -9,11 +9,15 @@ extension TaskCenter {
|
|||
weak var task: Task?
|
||||
|
||||
// To find slot
|
||||
let hashValue: Int
|
||||
let hash: Int
|
||||
|
||||
init(_ task: Task) {
|
||||
self.task = task
|
||||
self.hashValue = task.hashValue
|
||||
self.hash = task.hashValue
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(hash)
|
||||
}
|
||||
|
||||
// To find task
|
||||
|
|
Loading…
Reference in New Issue