Skip to content

Commit

Permalink
Bugfix for cleanup
Browse files Browse the repository at this point in the history
Take STATUS_STRING_REF in COMPU_METHOD and record_layout in TYPEDEF_AXIS into account,
so that items used by these are not removed during cleanup
  • Loading branch information
DanielT committed Mar 17, 2024
1 parent 8402dba commit 734d32c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cleanup/compu_methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ fn remove_unused_sub_elements(module: &mut Module) {
if let Some(ref_unit) = &compu_method.ref_unit {
used_units.insert(ref_unit.unit.clone());
}
if let Some(status_string_ref) = &compu_method.status_string_ref {
used_units.insert(status_string_ref.conversion_table.clone());
}
}

module
Expand Down
3 changes: 3 additions & 0 deletions src/cleanup/record_layouts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ pub(crate) fn cleanup(module: &mut Module) {
for typedef_characteristic in &module.typedef_characteristic {
used_record_layouts.insert(typedef_characteristic.record_layout.clone());
}
for typedef_axis in &module.typedef_axis {
used_record_layouts.insert(typedef_axis.record_layout.clone());
}
// deprecated since 1.60: MOD_COMMON / S_REC_LAOUT can specify the standard RECORD_LAYOUT
if let Some(mod_common) = &module.mod_common {
if let Some(s_rec_layout) = &mod_common.s_rec_layout {
Expand Down

0 comments on commit 734d32c

Please sign in to comment.