From df166c1996b7b3f3b9410a5190e1225850943828 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 11 Oct 2018 14:09:43 -0700 Subject: [PATCH] swift: cast to the appropriate type This fixes an error from the swift compiler: error: cannot convert value of type 'UInt32' to expected argument type 'UInt' --- src/swift/Block.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/swift/Block.swift b/src/swift/Block.swift index e90396bb1..0afbb265c 100644 --- a/src/swift/Block.swift +++ b/src/swift/Block.swift @@ -40,14 +40,14 @@ public class DispatchWorkItem { internal var _block: _DispatchBlock public init(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], block: @escaping @convention(block) () -> ()) { - _block = dispatch_block_create_with_qos_class(dispatch_block_flags_t(UInt32(flags.rawValue)), + _block = dispatch_block_create_with_qos_class(dispatch_block_flags_t(UInt(flags.rawValue)), qos.qosClass.rawValue.rawValue, Int32(qos.relativePriority), block) } // Used by DispatchQueue.synchronously to provide a path through // dispatch_block_t, as we know the lifetime of the block in question. internal init(flags: DispatchWorkItemFlags = [], noescapeBlock: () -> ()) { - _block = _swift_dispatch_block_create_noescape(dispatch_block_flags_t(UInt32(flags.rawValue)), noescapeBlock) + _block = _swift_dispatch_block_create_noescape(dispatch_block_flags_t(UInt(flags.rawValue)), noescapeBlock) } public func perform() {