File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 4
4
5
5
// / Used for std::string conformance to Swift.Hashable
6
6
typedef std::hash<std::string> __swift_interopHashOfString;
7
+ inline std::size_t __swift_interopComputeHashOfString (std::string str) {
8
+ return __swift_interopHashOfString ()(str);
9
+ }
7
10
8
11
// / Used for std::u16string conformance to Swift.Hashable
9
12
typedef std::hash<std::u16string> __swift_interopHashOfU16String;
13
+ inline std::size_t __swift_interopComputeHashOfU16String (std::u16string str) {
14
+ return __swift_interopHashOfU16String ()(str);
15
+ }
10
16
11
17
// / Used for std::u32string conformance to Swift.Hashable
12
18
typedef std::hash<std::u32string> __swift_interopHashOfU32String;
19
+ inline std::size_t __swift_interopComputeHashOfU32String (std::u32string str) {
20
+ return __swift_interopHashOfU32String ()(str);
21
+ }
13
22
14
23
inline std::chrono::seconds __swift_interopMakeChronoSeconds (int64_t seconds) {
15
24
return std::chrono::seconds (seconds);
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ extension std.string: Hashable {
198
198
@_alwaysEmitIntoClient
199
199
public func hash( into hasher: inout Hasher ) {
200
200
// Call std::hash<std::string>::operator()
201
- let cxxHash = __swift_interopHashOfString ( ) . callAsFunction ( self )
201
+ let cxxHash = __swift_interopComputeHashOfString ( self )
202
202
hasher. combine ( cxxHash)
203
203
}
204
204
}
@@ -207,7 +207,7 @@ extension std.u16string: Hashable {
207
207
@_alwaysEmitIntoClient
208
208
public func hash( into hasher: inout Hasher ) {
209
209
// Call std::hash<std::u16string>::operator()
210
- let cxxHash = __swift_interopHashOfU16String ( ) . callAsFunction ( self )
210
+ let cxxHash = __swift_interopComputeHashOfU16String ( self )
211
211
hasher. combine ( cxxHash)
212
212
}
213
213
}
@@ -216,7 +216,7 @@ extension std.u32string: Hashable {
216
216
@_alwaysEmitIntoClient
217
217
public func hash( into hasher: inout Hasher ) {
218
218
// Call std::hash<std::u32string>::operator()
219
- let cxxHash = __swift_interopHashOfU32String ( ) . callAsFunction ( self )
219
+ let cxxHash = __swift_interopComputeHashOfU32String ( self )
220
220
hasher. combine ( cxxHash)
221
221
}
222
222
}
You can’t perform that action at this time.
0 commit comments