mirror of
https://gitlab.cern.ch/wotsubo/endcap-sl-software-ri-generator.git
synced 2025-02-23 09:07:07 +09:00
fix(generator): add explicit cast to change types of array size & ptr offset
This commit is contained in:
parent
d85642dcec
commit
ae01a30cb0
1 changed files with 2 additions and 2 deletions
|
@ -231,9 +231,9 @@ impl CodeGen for Block {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
Some(multiple_param) => {
|
Some(multiple_param) => {
|
||||||
let num_multiple = multiple_param.multiple;
|
let num_multiple = multiple_param.multiple as usize;
|
||||||
let elements = (0..num_multiple).map(|i| {
|
let elements = (0..num_multiple).map(|i| {
|
||||||
let offset = multiple_param.offset * i;
|
let offset = (multiple_param.offset as usize) * i;
|
||||||
quote! {
|
quote! {
|
||||||
#snake_case_name::#child_upper_camel_name::new(unsafe { self.mem_ptr.add(#offset) } )
|
#snake_case_name::#child_upper_camel_name::new(unsafe { self.mem_ptr.add(#offset) } )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue