fix(ios): clear the compiler warnings from the first CI build

previewPalette does not throw, and mpv's wid now gets the layer's address
as an explicit int64 instead of a pointer to a Swift reference.
This commit is contained in:
nvrl committed 2026-10-07 01:27:10 +02:00
1 parent 3356602951
commit 4b9c01d52d
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -110,7 +110,8 @@ final class MpvPlayer {
layer.framebufferOnly = true layer.framebufferOnly = true
layer.backgroundColor = UIColor.black.cgColor layer.backgroundColor = UIColor.black.cgColor
guard let mpv = mpv_create() else { return } guard let mpv = mpv_create() else { return }
var wid = layer // mpv takes the layer's address as an int64, not a Swift reference.
var wid = Int64(Int(bitPattern: Unmanaged.passUnretained(layer).toOpaque()))
mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &wid) mpv_set_option(mpv, "wid", MPV_FORMAT_INT64, &wid)
for (name, value) in [ for (name, value) in [
("config", "no"), ("config", "no"),
+2 -2
View File
@@ -422,7 +422,7 @@ private struct AppearancePicker: View {
let accents = Self.accents let accents = Self.accents
guard let (palette, row) = try? await model.run({ engine -> (PaletteRecord, [AccentChoice: UInt32]) in guard let (palette, row) = try? await model.run({ engine -> (PaletteRecord, [AccentChoice: UInt32]) in
if store { try engine.setAppearance(appearance: next) } if store { try engine.setAppearance(appearance: next) }
let palette = try engine.previewPalette(appearance: next) let palette = engine.previewPalette(appearance: next)
// Every accent as it would look in *this* flavour: a swatch row that // Every accent as it would look in *this* flavour: a swatch row that
// keeps Mocha's pastels while Latte is selected lies about what the // keeps Mocha's pastels while Latte is selected lies about what the
// next tap does. // next tap does.
@@ -430,7 +430,7 @@ private struct AppearancePicker: View {
for accent in accents { for accent in accents {
var variant = next var variant = next
variant.accent = accent variant.accent = accent
row[accent] = try engine.previewPalette(appearance: variant).accent row[accent] = engine.previewPalette(appearance: variant).accent
} }
return (palette, row) return (palette, row)
}) else { return } }) else { return }