fix(3p/nix/libexpr): Fix post-increment operator in BindingsIterator
We accidentally returned the incremented iterator in the post-increment, this fixes it. Paired-With: Luke Granger-Brown <git@lukegb.com> Paired-With: Vincent Ambo <mail@tazj.in> Paired-With: Perry Lorier <isomer@tvl.fyi> Change-Id: I36c79eb56359bb12a78ad3489e7d7d2eb2053510 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1140 Tested-by: BuildkiteCI Reviewed-by: lukegb <lukegb@tvl.fyi> Reviewed-by: glittershark <grfn@gws.fyi>
This commit is contained in:
parent
785ca36316
commit
d94690b537
1 changed files with 2 additions and 1 deletions
3
third_party/nix/src/libexpr/attr-set.cc
vendored
3
third_party/nix/src/libexpr/attr-set.cc
vendored
|
@ -23,12 +23,13 @@ BindingsIterator& BindingsIterator::operator++() {
|
|||
}
|
||||
|
||||
BindingsIterator BindingsIterator::operator++(int) {
|
||||
auto old = *this;
|
||||
std::visit(util::overloaded{
|
||||
[](AttributeMap::iterator& iter) { iter++; },
|
||||
[](AttributeVector::iterator& iter) { iter++; },
|
||||
},
|
||||
_iterator);
|
||||
return *this;
|
||||
return old;
|
||||
}
|
||||
|
||||
bool BindingsIterator::operator==(const BindingsIterator& other) const {
|
||||
|
|
Loading…
Reference in a new issue