Skip to content

Commit

Permalink
AP_Param: Summarize the type definitions settings
Browse files Browse the repository at this point in the history
  • Loading branch information
muramura authored and tridge committed May 20, 2024
1 parent 91cdea1 commit ddae068
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libraries/AP_Param/AP_Param.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1353,8 +1353,7 @@ bool AP_Param::load(void)
return false;
}

AP_Param *ap;
ap = this;
AP_Param *ap = this;
if (idx != 0) {
ap = (AP_Param *)((ptrdiff_t)ap) - (idx*sizeof(float));
}
Expand Down Expand Up @@ -1967,8 +1966,7 @@ void AP_Param::convert_old_parameter(const struct ConversionInfo *info, float sc

// find the new variable in the variable structures
enum ap_var_type ptype;
AP_Param *ap2;
ap2 = find(&info->new_name[0], &ptype);
AP_Param *ap2 = find(&info->new_name[0], &ptype);
if (ap2 == nullptr) {
DEV_PRINTF("Unknown conversion '%s'\n", info->new_name);
return;
Expand Down

0 comments on commit ddae068

Please sign in to comment.