struct variable, #16/18, drop intermediate variable
This commit is contained in:
parent
212121d373
commit
af81e6810e
|
|
@ -60,9 +60,7 @@ cp_enqvar(char *word)
|
|||
double value = isreal(d)
|
||||
? d->v_realdata[i]
|
||||
: realpart(d->v_compdata[i]);
|
||||
struct variable *tv;
|
||||
tv = var_alloc_real(NULL, value, list);
|
||||
list = tv;
|
||||
list = var_alloc_real(NULL, value, list);
|
||||
}
|
||||
vv = var_alloc_vlist(copy(word), list, NULL);
|
||||
}
|
||||
|
|
@ -90,9 +88,7 @@ cp_enqvar(char *word)
|
|||
struct variable *list = NULL;
|
||||
struct plot *pl;
|
||||
for (pl = plot_list; pl; pl = pl->pl_next) {
|
||||
struct variable *tv;
|
||||
tv = var_alloc_string(NULL, copy(pl->pl_typename), list);
|
||||
list = tv;
|
||||
list = var_alloc_string(NULL, copy(pl->pl_typename), list);
|
||||
}
|
||||
vv = var_alloc_vlist(copy(word), list, NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -980,9 +980,7 @@ parmtovar(IFvalue *pv, IFparm *opt)
|
|||
struct variable *list = NULL;
|
||||
int i;
|
||||
for (i = pv->v.numValue; --i >= 0;) {
|
||||
struct variable *nv;
|
||||
nv = var_alloc_real(NULL, pv->v.vec.rVec[i], list);
|
||||
list = nv;
|
||||
list = var_alloc_real(NULL, pv->v.vec.rVec[i], list);
|
||||
}
|
||||
vv = var_alloc_vlist(copy(opt->description), list, NULL);
|
||||
return vv;
|
||||
|
|
|
|||
Loading…
Reference in New Issue