From d22de1dd0c060971cb2cbeb9e49cae84c8d395cb Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Wed, 9 Jun 2021 15:38:08 -0600 Subject: [PATCH] remove dead code --- src/libexpr/eval.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 85bff6ee5..f8fe0f309 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -616,7 +616,6 @@ std::optional EvalState::getDoc(Value & v) return {}; } -// typedef std::optional> valmap; typedef std::map valmap; LocalNoInline(valmap * map0()) @@ -626,7 +625,6 @@ LocalNoInline(valmap * map0()) LocalNoInline(valmap * map1(const char *name, Value *v)) { - // return new valmap({{name, v}}); return new valmap({{name, v}}); } @@ -640,13 +638,10 @@ LocalNoInline(valmap * mapBindings(Bindings *b)) { auto map = new valmap(); - // auto v = new Value; - for (auto i = b->begin(); i != b->end(); ++i) { std::string s = i->name; (*map)[s] = i->value; - // map->insert({std::string("wat"), v}); } return map; @@ -866,7 +861,8 @@ inline Value * EvalState::lookupVar(Env * env, const ExprVar & var, bool noEval) return j->value; } if (!env->prevWith) - throwUndefinedVarError(var.pos, "undefined variable '%1%'", var.name, map0()); // TODO: env.attrs? + // TODO: env.attrs? + throwUndefinedVarError(var.pos, "undefined variable '%1%'", var.name, map0()); for (size_t l = env->prevWith; l; --l, env = env->up) ; } }