diff --git a/third_party/nix/src/libexpr/attr-set.hh b/third_party/nix/src/libexpr/attr-set.hh index 6b68b4664..cdfe9e41d 100644 --- a/third_party/nix/src/libexpr/attr-set.hh +++ b/third_party/nix/src/libexpr/attr-set.hh @@ -21,7 +21,7 @@ struct Attr { Attr(Symbol name, Value* value, Pos* pos = &noPos) : name(name), value(value), pos(pos){}; Attr() : pos(&noPos){}; - bool operator<(const Attr& a) const { return name < a.name; } + bool operator<(const Attr& other) const { return name < other.name; } }; // TODO: remove this, it only exists briefly while I get rid of the diff --git a/third_party/nix/src/libexpr/eval.cc b/third_party/nix/src/libexpr/eval.cc index c654faa76..b406854f4 100644 --- a/third_party/nix/src/libexpr/eval.cc +++ b/third_party/nix/src/libexpr/eval.cc @@ -815,8 +815,8 @@ void ExprAttrs::eval(EvalState& state, Env& env, Value& value) { size_t displ = 0; for (auto& attr : attrs) { Value* vAttr; - vAttr = attr.second.e->maybeThunk(state, - attr.second.inherited ? env : env2); + vAttr = + attr.second.e->maybeThunk(state, attr.second.inherited ? env : env2); env2.values[displ++] = vAttr; value.attrs->push_back(Attr(attr.first, vAttr, &attr.second.pos)); } diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh index 73e35c9b2..03dd275ed 100644 --- a/third_party/nix/src/libexpr/eval.hh +++ b/third_party/nix/src/libexpr/eval.hh @@ -53,6 +53,10 @@ typedef std::list SearchPath; /* Initialise the Boehm GC, if applicable. */ void initGC(); +typedef std::map, + traceable_allocator>> + FileParseCache; + class EvalState { public: SymbolTable symbols; @@ -79,23 +83,12 @@ class EvalState { SrcToStore srcToStore; /* A cache from path names to parse trees. */ -#if HAVE_BOEHMGC - typedef std::map, - traceable_allocator>> - FileParseCache; -#else - typedef std::map FileParseCache; -#endif FileParseCache fileParseCache; /* A cache from path names to values. */ -#if HAVE_BOEHMGC typedef std::map, traceable_allocator>> FileEvalCache; -#else - typedef std::map FileEvalCache; -#endif FileEvalCache fileEvalCache; SearchPath searchPath; diff --git a/third_party/nix/src/libexpr/value.hh b/third_party/nix/src/libexpr/value.hh index 892c11220..1f20a440d 100644 --- a/third_party/nix/src/libexpr/value.hh +++ b/third_party/nix/src/libexpr/value.hh @@ -244,14 +244,9 @@ void mkPath(Value& v, const char* s); not included. */ size_t valueSize(Value& v); -#if HAVE_BOEHMGC typedef std::vector > ValueVector; typedef std::map, gc_allocator > > ValueMap; -#else -typedef std::vector ValueVector; -typedef std::map ValueMap; -#endif } // namespace nix