diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-08-20 12:34:04 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-08-20 12:34:04 +0200 |
commit | 25ecfffdc322d8df5834e6add1c5e28fcf2818f9 (patch) | |
tree | 22927efa9c7713acc9948c74d57f11722626bc94 | |
parent | dc2f278c95ce4a73749cbb8221a568201535d46a (diff) |
Remove PrimOp constructor
-rw-r--r-- | src/libexpr/eval.cc | 4 | ||||
-rw-r--r-- | src/libexpr/eval.hh | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 0123070d1..9a155c055 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -509,7 +509,7 @@ Value * EvalState::addPrimOp(const string & name, if (arity == 0) { auto vPrimOp = allocValue(); vPrimOp->type = tPrimOp; - vPrimOp->primOp = new PrimOp(primOp, 1, sym); + vPrimOp->primOp = new PrimOp { .fun = primOp, .arity = 1, .name = sym }; Value v; mkApp(v, *vPrimOp, *vPrimOp); return addConstant(name, v); @@ -517,7 +517,7 @@ Value * EvalState::addPrimOp(const string & name, Value * v = allocValue(); v->type = tPrimOp; - v->primOp = new PrimOp(primOp, arity, sym); + v->primOp = new PrimOp { .fun = primOp, .arity = arity, .name = sym }; staticBaseEnv.vars[symbols.create(name)] = baseEnvDispl; baseEnv.values[baseEnvDispl++] = v; baseEnv.values[0]->attrs->push_back(Attr(sym, v)); diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 1db3aa766..38e025a3d 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -30,8 +30,6 @@ struct PrimOp PrimOpFun fun; size_t arity; Symbol name; - PrimOp(PrimOpFun fun, size_t arity, Symbol name) - : fun(fun), arity(arity), name(name) { } }; |