History

mac/option: remove unused and obsolete variables

der richter committed 2 years ago

Commit 2d9be041 parent dc5059d3 files · +3 −8Browse files

Unified · Split

3 files
  1. osdep/mac/option_helper.swift +1 −6
  2. video/out/cocoa_cb_common.swift +1 −1
  3. video/out/mac_common.swift +1 −1
osdep/mac/option_helper.swift+1−6
@@ -20,7 +20,6 @@ import Cocoa · 19 unmodified lines
20typealias swift_wakeup_cb_fn = (@convention(c) (UnsafeMutableRawPointer?) -> Void)?20typealias swift_wakeup_cb_fn = (@convention(c) (UnsafeMutableRawPointer?) -> Void)?
21 21
22class OptionHelper: NSObject {22class OptionHelper: NSObject {
23 var log: LogHelper
24 var vo: UnsafeMutablePointer<vo>23 var vo: UnsafeMutablePointer<vo>
25 var optsCachePtr: UnsafeMutablePointer<m_config_cache>24 var optsCachePtr: UnsafeMutablePointer<m_config_cache>
26 var optsPtr: UnsafeMutablePointer<mp_vo_opts>25 var optsPtr: UnsafeMutablePointer<mp_vo_opts>
@@ -30,15 +29,11 @@ class OptionHelper: NSObject { · 3 unmodified lines
30 // these computed properties return a local copy of the struct accessed:29 // these computed properties return a local copy of the struct accessed:
31 // - don't use if you rely on the pointers30 // - don't use if you rely on the pointers
32 // - only for reading31 // - only for reading
33 var vout: vo { get { return vo.pointee } }
34 var optsCache: m_config_cache { get { return optsCachePtr.pointee } }
35 var opts: mp_vo_opts { get { return optsPtr.pointee } }32 var opts: mp_vo_opts { get { return optsPtr.pointee } }
36 var macOptsCache: m_config_cache { get { return macOptsCachePtr.pointee } }
37 var macOpts: macos_opts { get { return macOptsPtr.pointee } }33 var macOpts: macos_opts { get { return macOptsPtr.pointee } }
38 34
39 init(_ vo: UnsafeMutablePointer<vo>, _ log: LogHelper) {35 init(_ vo: UnsafeMutablePointer<vo>) {
40 self.vo = vo36 self.vo = vo
41 self.log = log
42 37
43 guard let cache = m_config_cache_alloc(vo, vo.pointee.global, Application.getVoSubConf()),38 guard let cache = m_config_cache_alloc(vo, vo.pointee.global, Application.getVoSubConf()),
44 let macCache = m_config_cache_alloc(vo, vo.pointee.global, Application.getMacOSConf()) else39 let macCache = m_config_cache_alloc(vo, vo.pointee.global, Application.getMacOSConf()) else
video/out/cocoa_cb_common.swift+1−1
@@ -39,7 +39,7 @@ class CocoaCB: Common { · 38 unmodified lines
39 }39 }
40 40
41 func preinit(_ vo: UnsafeMutablePointer<vo>) {41 func preinit(_ vo: UnsafeMutablePointer<vo>) {
42 option = OptionHelper(vo, log)42 option = OptionHelper(vo)
43 input = InputHelper(vo.pointee.input_ctx, option)43 input = InputHelper(vo.pointee.input_ctx, option)
44 44
45 if backendState == .uninitialized {45 if backendState == .uninitialized {
video/out/mac_common.swift+1−1
@@ -27,7 +27,7 @@ class MacCommon: Common { · 26 unmodified lines
27 @objc init(_ vo: UnsafeMutablePointer<vo>) {27 @objc init(_ vo: UnsafeMutablePointer<vo>) {
28 let newlog = mp_log_new(vo, vo.pointee.log, "mac")28 let newlog = mp_log_new(vo, vo.pointee.log, "mac")
29 super.init(newlog)29 super.init(newlog)
30 option = OptionHelper(vo, log)30 option = OptionHelper(vo)
31 input = InputHelper(vo.pointee.input_ctx, option)31 input = InputHelper(vo.pointee.input_ctx, option)
32 timer = PreciseTimer(common: self)32 timer = PreciseTimer(common: self)
33 33

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t