Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
helgoboss committed Aug 20, 2024
1 parent 90a6494 commit 24cd217
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
7 changes: 2 additions & 5 deletions main/src/application/unit_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,7 @@ impl UnitModel {
compartment: CompartmentKind,
source_value: IncomingCompoundSourceValue,
) -> Option<&SharedMapping> {
let virtualization = self.virtualize_source_value(source_value);
if virtualization.is_none() {
return None;
}
let virtualization = self.virtualize_source_value(source_value)?;
let instance_state = self.unit.borrow();
use CompoundMappingSource::*;
self.mappings(compartment).find(|m| {
Expand All @@ -485,7 +482,7 @@ impl UnitModel {
return false;
}
let mapping_source = m.source_model.create_source();
if let (Virtual(virtual_source), Some(v)) = (&mapping_source, &virtualization) {
if let (Virtual(virtual_source), v) = (&mapping_source, &virtualization) {
virtual_source.control(&v.virtual_source_value).is_some()
} else {
mapping_source
Expand Down
15 changes: 10 additions & 5 deletions main/src/infrastructure/ui/app/app_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::infrastructure::proto::{
};
use crate::infrastructure::ui::AppHandle;
use anyhow::{anyhow, bail, Context, Result};
use base::hash_util::{NonCryptoHashMap, NonCryptoHashSet};
use base::hash_util::NonCryptoHashMap;
use fragile::Fragile;
use once_cell::sync::Lazy;
use prost::Message;
Expand Down Expand Up @@ -237,7 +237,6 @@ impl AppInstance for StandaloneAppInstance {
.send(reply)
}


fn notify_app_is_ready(&mut self, callback: AppCallback) {
let Some(running_state) = &mut self.running_state else {
return;
Expand Down Expand Up @@ -275,10 +274,14 @@ impl AppInstance for StandaloneAppInstance {
}

static APP_WINDOWS_IN_TEXT_ENTRY: Lazy<Fragile<RefCell<NonCryptoHashMap<Hwnd, bool>>>> =
Lazy::new(|| Default::default());
Lazy::new(Default::default);

pub fn app_window_is_in_text_entry_mode(window: Hwnd) -> Option<bool> {
APP_WINDOWS_IN_TEXT_ENTRY.get().borrow().get(&window).copied()
APP_WINDOWS_IN_TEXT_ENTRY
.get()
.borrow()
.get(&window)
.copied()
}

#[derive(Debug)]
Expand All @@ -297,7 +300,9 @@ impl CommonAppRunningState {
pub fn window(&self) -> Option<Hwnd> {
let app_library = BackboneShell::get_app_library().ok()?;
app_library
.app_instance_get_window(self.app_handle).ok().flatten()
.app_instance_get_window(self.app_handle)
.ok()
.flatten()
}

pub fn is_visible(&self) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion playtime-clip-engine
1 change: 1 addition & 0 deletions resources/api/luau/playtime.luau
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,7 @@ export type Clip = {
color: ClipColor,
dynamic_section: Section?,
fixed_section: Section,
pitch_shift: Semitones?,
audio_settings: ClipAudioSettings,
midi_settings: ClipMidiSettings,
}
Expand Down

0 comments on commit 24cd217

Please sign in to comment.