Skip to content

Commit 0037a65

Browse files
committed
Xcode 12 build
1 parent ba7dfd3 commit 0037a65

File tree

6 files changed

+19
-14
lines changed

6 files changed

+19
-14
lines changed

Example/ImmutableGraph.xcodeproj/project.pbxproj

+7-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@
170170
isa = PBXProject;
171171
attributes = {
172172
LastSwiftUpdateCheck = 0720;
173-
LastUpgradeCheck = 0900;
173+
LastUpgradeCheck = 1200;
174174
ORGANIZATIONNAME = CocoaPods;
175175
TargetAttributes = {
176176
607FACE41AFB9204008FA782 = {
@@ -280,14 +280,17 @@
280280
CLANG_WARN_BOOL_CONVERSION = YES;
281281
CLANG_WARN_COMMA = YES;
282282
CLANG_WARN_CONSTANT_CONVERSION = YES;
283+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
283284
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
284285
CLANG_WARN_EMPTY_BODY = YES;
285286
CLANG_WARN_ENUM_CONVERSION = YES;
286287
CLANG_WARN_INFINITE_RECURSION = YES;
287288
CLANG_WARN_INT_CONVERSION = YES;
288289
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
290+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
289291
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
290292
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
293+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
291294
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
292295
CLANG_WARN_STRICT_PROTOTYPES = YES;
293296
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -334,14 +337,17 @@
334337
CLANG_WARN_BOOL_CONVERSION = YES;
335338
CLANG_WARN_COMMA = YES;
336339
CLANG_WARN_CONSTANT_CONVERSION = YES;
340+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
337341
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
338342
CLANG_WARN_EMPTY_BODY = YES;
339343
CLANG_WARN_ENUM_CONVERSION = YES;
340344
CLANG_WARN_INFINITE_RECURSION = YES;
341345
CLANG_WARN_INT_CONVERSION = YES;
342346
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
347+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
343348
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
344349
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
345351
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
346352
CLANG_WARN_STRICT_PROTOTYPES = YES;
347353
CLANG_WARN_SUSPICIOUS_MOVE = YES;

Example/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ EXTERNAL SOURCES:
99
:path: "../"
1010

1111
SPEC CHECKSUMS:
12-
ImmutableGraph: df24e5e00d06c29b108eff315840e3042389aa8c
12+
ImmutableGraph: 5e26222f4fdafc7b9e5b8196dbc16758bba6b563
1313

1414
PODFILE CHECKSUM: a68ff2910ea3747fe37b2fd2552bb335e940447a
1515

Example/Pods/Local Podspecs/ImmutableGraph.podspec.json

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ImmutableGraph.podspec

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Functional Swift graph algorithms: DFS, BFS and FindPath on immutable graphs dev
2828
s.source = { :git => 'https://github.com/horothesun/ImmutableGraph.git', :tag => s.version.to_s }
2929
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
3030

31+
s.swift_versions = '5.0'
3132
s.ios.deployment_target = '9.0'
3233

3334
s.source_files = 'ImmutableGraph/Classes/**/*'

ImmutableGraph/Classes/Graphs/Edge.swift

+6-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public protocol Weightable { var weight: Double { get } }
1313
public protocol WeightedEdgeProtocol: EdgeProtocol, Weightable { }
1414

1515

16-
public struct Edge<V>: EdgeProtocol
16+
public struct Edge<V>: EdgeProtocol, Hashable
1717
where V: Equatable {
1818

1919
public let source: V
@@ -25,10 +25,8 @@ public struct Edge<V>: EdgeProtocol
2525
self.destination = destination
2626
}
2727

28-
public var hashValue: Int {
29-
get {
30-
return "\(source)->\(destination)".hashValue
31-
}
28+
public func hash(into hasher: inout Hasher) {
29+
hasher.combine("\(source)->\(destination)")
3230
}
3331

3432
public static func ==(lhs: Edge, rhs: Edge) -> Bool {
@@ -41,7 +39,7 @@ public struct Edge<V>: EdgeProtocol
4139
}
4240

4341

44-
public struct WeightedEdge<V>: WeightedEdgeProtocol
42+
public struct WeightedEdge<V>: WeightedEdgeProtocol, Hashable
4543
where V: Equatable {
4644

4745
public let source: V
@@ -56,10 +54,8 @@ public struct WeightedEdge<V>: WeightedEdgeProtocol
5654
self.weight = weight
5755
}
5856

59-
public var hashValue: Int {
60-
get {
61-
return "\(source)-(\(weight))->\(destination)".hashValue
62-
}
57+
public func hash(into hasher: inout Hasher) {
58+
hasher.combine("\(source)-(\(weight))->\(destination)")
6359
}
6460

6561
public static func ==(lhs: WeightedEdge, rhs: WeightedEdge) -> Bool {

0 commit comments

Comments
 (0)