Skip to content

Commit

Permalink
Replace more usages of built in profiling macro with profiling crate …
Browse files Browse the repository at this point in the history
…one after merging with master
  • Loading branch information
teddemunnik committed Oct 27, 2024
1 parent c51b193 commit 088161c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/eframe/src/native/app_icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ fn set_app_icon_windows(icon_data: &IconData) -> AppIconStatus {
#[allow(unsafe_code)]
fn set_title_and_icon_mac(title: &str, icon_data: Option<&IconData>) -> AppIconStatus {
use crate::icon_data::IconDataExt as _;
crate::profile_function!();
profiling::function_scope!();

use objc2::ClassType;
use objc2_app_kit::{NSApplication, NSImage};
Expand Down Expand Up @@ -237,7 +237,7 @@ fn set_title_and_icon_mac(title: &str, icon_data: Option<&IconData>) -> AppIconS
log::trace!("NSImage::initWithData…");
let app_icon = NSImage::initWithData(NSImage::alloc(), &data);

crate::profile_scope!("setApplicationIconImage_");
profiling::scope!("setApplicationIconImage_");
log::trace!("setApplicationIconImage…");
app.setApplicationIconImage(app_icon.as_deref());
}
Expand All @@ -246,7 +246,7 @@ fn set_title_and_icon_mac(title: &str, icon_data: Option<&IconData>) -> AppIconS
if let Some(main_menu) = app.mainMenu() {
if let Some(item) = main_menu.itemAtIndex(0) {
if let Some(app_menu) = item.submenu() {
crate::profile_scope!("setTitle_");
profiling::scope!("setTitle_");
app_menu.setTitle(&NSString::from_str(title));
}
}
Expand Down

0 comments on commit 088161c

Please sign in to comment.