mac/option: remove unused and obsolete variables

This commit is contained in:
der richter 2024-03-19 19:53:07 +01:00
parent dc5059d027
commit 2d9be04c00
3 changed files with 3 additions and 8 deletions

View File

@ -20,7 +20,6 @@ import Cocoa
typealias swift_wakeup_cb_fn = (@convention(c) (UnsafeMutableRawPointer?) -> Void)?
class OptionHelper: NSObject {
var log: LogHelper
var vo: UnsafeMutablePointer<vo>
var optsCachePtr: UnsafeMutablePointer<m_config_cache>
var optsPtr: UnsafeMutablePointer<mp_vo_opts>
@ -30,15 +29,11 @@ class OptionHelper: NSObject {
// these computed properties return a local copy of the struct accessed:
// - don't use if you rely on the pointers
// - only for reading
var vout: vo { get { return vo.pointee } }
var optsCache: m_config_cache { get { return optsCachePtr.pointee } }
var opts: mp_vo_opts { get { return optsPtr.pointee } }
var macOptsCache: m_config_cache { get { return macOptsCachePtr.pointee } }
var macOpts: macos_opts { get { return macOptsPtr.pointee } }
init(_ vo: UnsafeMutablePointer<vo>, _ log: LogHelper) {
init(_ vo: UnsafeMutablePointer<vo>) {
self.vo = vo
self.log = log
guard let cache = m_config_cache_alloc(vo, vo.pointee.global, Application.getVoSubConf()),
let macCache = m_config_cache_alloc(vo, vo.pointee.global, Application.getMacOSConf()) else

View File

@ -39,7 +39,7 @@ class CocoaCB: Common {
}
func preinit(_ vo: UnsafeMutablePointer<vo>) {
option = OptionHelper(vo, log)
option = OptionHelper(vo)
input = InputHelper(vo.pointee.input_ctx, option)
if backendState == .uninitialized {

View File

@ -27,7 +27,7 @@ class MacCommon: Common {
@objc init(_ vo: UnsafeMutablePointer<vo>) {
let newlog = mp_log_new(vo, vo.pointee.log, "mac")
super.init(newlog)
option = OptionHelper(vo, log)
option = OptionHelper(vo)
input = InputHelper(vo.pointee.input_ctx, option)
timer = PreciseTimer(common: self)