mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Fix cpp code gen
This commit is contained in:
parent
a941c5cca0
commit
e6e7b4e3df
1 changed files with 2 additions and 2 deletions
|
@ -3542,12 +3542,12 @@ fn compile_builtin_function_call(
|
|||
format!("std::atan2({}, {}) / {}", a.next().unwrap(), a.next().unwrap(), pi_180)
|
||||
}
|
||||
BuiltinFunction::ToFixed => {
|
||||
format!("[](float n, int d) {{ slint::SharedString out; slint::cbindgen_private::slint_string_from_number_fixed(&out, std::n, std::max(d, 0); return out; }}({}, {})",
|
||||
format!("[](float n, int d) {{ slint::SharedString out; slint::cbindgen_private::slint_shared_string_from_number_fixed(&out, n, std::max(d, 0)); return out; }}({}, {})",
|
||||
a.next().unwrap(), a.next().unwrap(),
|
||||
)
|
||||
}
|
||||
BuiltinFunction::ToPrecision => {
|
||||
format!("[](float n, int p) {{ slint::SharedString out; slint::cbindgen_private::slint_string_from_number_precision(&out, n, std::max(p, 0)); return out; }}({}, {})",
|
||||
format!("[](float n, int p) {{ slint::SharedString out; slint::cbindgen_private::slint_shared_string_from_number_precision(&out, n, std::max(p, 0)); return out; }}({}, {})",
|
||||
a.next().unwrap(), a.next().unwrap(),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue