Skip to content

Commit

Permalink
updated for swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dahan committed May 16, 2019
1 parent d578876 commit 09f0ef3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2
5.0
4 changes: 2 additions & 2 deletions Algorithm.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Algorithm'
s.version = '3.0'
s.swift_version = '4.2'
s.version = '3.1'
s.swift_version = '5.0'
s.license = 'BSD-3-Clause'
s.summary = 'A toolset for writing algorithms in Swift.'
s.homepage = 'http://algorithmswift.io'
Expand Down
26 changes: 12 additions & 14 deletions Algorithm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -374,17 +374,19 @@
TargetAttributes = {
65744C9B1C554BA50011C977 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 1020;
};
65744CA51C554BA50011C977 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 0800;
LastSwiftMigration = 1020;
};
65744CC51C554E370011C977 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 1020;
};
65744CCE1C554E380011C977 = {
CreatedOnToolsVersion = 7.2;
LastSwiftMigration = 1020;
};
};
};
Expand Down Expand Up @@ -669,8 +671,7 @@
PRODUCT_NAME = Algorithm;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -689,8 +690,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.cosmicmind.Algorithm;
PRODUCT_NAME = Algorithm;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -703,7 +703,7 @@
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.AlgorithmTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -715,7 +715,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = io.cosmicmind.AlgorithmTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -738,8 +738,7 @@
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -761,8 +760,7 @@
PRODUCT_NAME = Algorithm;
SDKROOT = macosx;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -779,7 +777,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -795,7 +793,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "io.cosmicmind.Algorithm-OSXTests";
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Sources/Algorithm+Array.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension Array where Element: Equatable {
*/
@discardableResult
mutating func remove(object: Element) -> Element? {
return index(of: object).map { self.remove(at: $0) }
return firstIndex(of: object).map { self.remove(at: $0) }
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>3.0</string>
<string>3.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 09f0ef3

Please sign in to comment.