summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2020-12-25 14:47:35 +0100
committerder richter <der.richter@gmx.de>2021-01-13 16:23:47 +0100
commitce1571ac01e815c71a6075a4bad1c7b5ec4820dd (patch)
tree340c593f25f05f6eba303104f1e12e858cbeb770 /osdep
parentbc58361d86e695d3bf875e1dd826f9fbbd586502 (diff)
downloadmpv-ce1571ac01e815c71a6075a4bad1c7b5ec4820dd.tar.bz2
mpv-ce1571ac01e815c71a6075a4bad1c7b5ec4820dd.tar.xz
mac: drop build support for swift versions earlier than version 4.1
this drops support for swift <4.1 and with this support for xcode <=9.2. this was the last setup that is officially working on macOS 10.12. our old legacy build macOS 10.12 + xcode 9.2 is replaced by macOS 10.13 + xcode 9.4.1 with swift 4.1. the macOS 10.13 + xcode 10.1 VM is replaced by the latest macOS 10.14 + xcode 11.3.1 VM. this is the oldest version officially supported by Apple. this is in preparations for the following commit.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/macos/swift_compat.swift27
1 files changed, 0 insertions, 27 deletions
diff --git a/osdep/macos/swift_compat.swift b/osdep/macos/swift_compat.swift
index c14aa08282..24c00b0ae1 100644
--- a/osdep/macos/swift_compat.swift
+++ b/osdep/macos/swift_compat.swift
@@ -33,7 +33,6 @@ extension String {
#endif
extension NSPasteboard.PasteboardType {
-
static let fileURLCompat: NSPasteboard.PasteboardType = {
if #available(OSX 10.13, *) {
return .fileURL
@@ -53,7 +52,6 @@ extension NSPasteboard.PasteboardType {
#if !swift(>=5.0)
extension Data {
-
mutating func withUnsafeMutableBytes<Type>(_ body: (UnsafeMutableRawBufferPointer) throws -> Type) rethrows -> Type {
let dataCount = count
return try withUnsafeMutableBytes { (ptr: UnsafeMutablePointer<UInt8>) throws -> Type in
@@ -65,33 +63,8 @@ extension Data {
#if !swift(>=4.2)
extension NSDraggingInfo {
-
var draggingPasteboard: NSPasteboard {
get { return draggingPasteboard() }
}
}
#endif
-
-#if !swift(>=4.1)
-extension Array {
-
- func compactMap<ElementOfResult>(_ transform: (Element) throws -> ElementOfResult?) rethrows -> [ElementOfResult] {
- return try self.flatMap(transform)
- }
-}
-
-extension Array where Element == [CGLPixelFormatAttribute] {
-
- func contains(_ obj: [CGLPixelFormatAttribute]) -> Bool {
- return self.contains(where:{ $0 == obj })
- }
-}
-
-extension NSWindow.Level {
-
- static func +(left: NSWindow.Level, right: Int) -> NSWindow.Level {
- return NSWindow.Level(left.rawValue + right)
- }
-}
-#endif
-