Clean up build warnings

This commit is contained in:
Skyler Lehmkuhl 2026-07-09 13:24:27 -04:00
parent 6e6feaddf5
commit a2839f80b1
4 changed files with 5 additions and 6 deletions

View File

@ -175,7 +175,9 @@ impl GpuYuv {
} }
/// CPU reference for the exact math/layout the shader produces — used by unit tests so /// CPU reference for the exact math/layout the shader produces — used by unit tests so
/// the packing and BT.709 coefficients stay verifiable without a GPU. /// the packing and BT.709 coefficients stay verifiable without a GPU. Test-only, so it isn't
/// compiled into (and flagged as unused by) release builds.
#[cfg(test)]
fn cpu_reference(rgba: &[u8], width: u32, height: u32, full_range: bool) -> Vec<u8> { fn cpu_reference(rgba: &[u8], width: u32, height: u32, full_range: bool) -> Vec<u8> {
let w = width as usize; let w = width as usize;
let h = height as usize; let h = height as usize;

View File

@ -40,7 +40,7 @@ const TOPBAR_H: f32 = 40.0;
/// Clamp a desktop dialog width to fit the current screen (with side margins). A no-op on wide /// Clamp a desktop dialog width to fit the current screen (with side margins). A no-op on wide
/// desktop screens (`min` keeps the desired width); on a phone-aspect window it shrinks to fit. /// desktop screens (`min` keeps the desired width); on a phone-aspect window it shrinks to fit.
pub fn dialog_width(ctx: &egui::Context, desired: f32) -> f32 { pub fn dialog_width(ctx: &egui::Context, desired: f32) -> f32 {
let avail = ctx.screen_rect().width() - 24.0; let avail = ctx.content_rect().width() - 24.0;
desired.min(avail.max(200.0)) desired.min(avail.max(200.0))
} }

View File

@ -36,8 +36,6 @@ pub struct MobileNodeState {
pub mode: NodeViewMode, pub mode: NodeViewMode,
/// The module currently shown in Focus (and centred in Patch). /// The module currently shown in Focus (and centred in Patch).
pub focus_node: Option<NodeId>, pub focus_node: Option<NodeId>,
/// Armed cable source in Patch: (node, output-port index).
pub patch_source: Option<(NodeId, usize)>,
/// Whether the add-node picker overlay is open. /// Whether the add-node picker overlay is open.
pub show_add: bool, pub show_add: bool,
/// Search filter in the add-node picker. /// Search filter in the add-node picker.
@ -51,7 +49,6 @@ impl Default for MobileNodeState {
Self { Self {
mode: NodeViewMode::Focus, mode: NodeViewMode::Focus,
focus_node: None, focus_node: None,
patch_source: None,
show_add: false, show_add: false,
add_search: String::new(), add_search: String::new(),
patch_pick: None, patch_pick: None,

View File

@ -165,7 +165,7 @@ impl PreferencesDialog {
// mobile modals; on desktop, the familiar draggable window. // mobile modals; on desktop, the familiar draggable window.
let width = crate::mobile::dialog_width(ctx, 550.0); let width = crate::mobile::dialog_width(ctx, 550.0);
let scroll_h = if mobile { let scroll_h = if mobile {
(ctx.screen_rect().height() - 220.0).clamp(160.0, 400.0) (ctx.content_rect().height() - 220.0).clamp(160.0, 400.0)
} else { } else {
400.0 400.0
}; };