Pass the Padding by value in the layout data struct

It can simply be a Copy type anyway.
So there is no more special code needed in the rust (and also in C++) generator for it
This commit is contained in:
Olivier Goffart 2022-01-18 11:15:52 +01:00 committed by Simon Hausmann
parent 4b0ae4d5a1
commit b36de552e5
3 changed files with 7 additions and 17 deletions

View file

@ -334,7 +334,7 @@ impl Default for Constraint {
}
#[repr(C)]
#[derive(Debug, Default)]
#[derive(Copy, Clone, Debug, Default)]
pub struct Padding {
pub begin: Coord,
pub end: Coord,
@ -345,7 +345,7 @@ pub struct Padding {
pub struct GridLayoutData<'a> {
pub size: Coord,
pub spacing: Coord,
pub padding: &'a Padding,
pub padding: Padding,
pub cells: Slice<'a, GridLayoutCellData>,
}
@ -432,7 +432,7 @@ impl Default for LayoutAlignment {
pub struct BoxLayoutData<'a> {
pub size: Coord,
pub spacing: Coord,
pub padding: &'a Padding,
pub padding: Padding,
pub alignment: LayoutAlignment,
pub cells: Slice<'a, BoxLayoutCellData>,
}