mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-26 21:08:40 +00:00
fixup: remove redundant unsafe scope
This commit is contained in:
parent
1d06e2c049
commit
beccfa89ec
@ -61,7 +61,7 @@ impl DrawData {
|
|||||||
}
|
}
|
||||||
slice::from_raw_parts(
|
slice::from_raw_parts(
|
||||||
self.cmd_lists as *const *const DrawList,
|
self.cmd_lists as *const *const DrawList,
|
||||||
self.cmd_lists_count as usize
|
self.cmd_lists_count as usize,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/// Converts all buffers from indexed to non-indexed, in case you cannot render indexed
|
/// Converts all buffers from indexed to non-indexed, in case you cannot render indexed
|
||||||
@ -149,16 +149,14 @@ impl RawWrapper for DrawList {
|
|||||||
impl DrawList {
|
impl DrawList {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub(crate) unsafe fn cmd_buffer(&self) -> &[sys::ImDrawCmd] {
|
pub(crate) unsafe fn cmd_buffer(&self) -> &[sys::ImDrawCmd] {
|
||||||
unsafe {
|
if self.0.CmdBuffer.Size <= 0 || self.0.CmdBuffer.Data.is_null() {
|
||||||
if self.0.CmdBuffer.Size <= 0 || self.0.CmdBuffer.Data.is_null() {
|
return &[];
|
||||||
return &[];
|
|
||||||
}
|
|
||||||
|
|
||||||
slice::from_raw_parts(
|
|
||||||
self.0.CmdBuffer.Data as *const sys::ImDrawCmd,
|
|
||||||
self.0.CmdBuffer.Size as usize,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
slice::from_raw_parts(
|
||||||
|
self.0.CmdBuffer.Data as *const sys::ImDrawCmd,
|
||||||
|
self.0.CmdBuffer.Size as usize,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user