1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 13:51:16 +02:00

libexpr: Remove non-const overload of listElems

This overload isn't actually necessary anywhere and
doesn't make much sense. The pointers to `Value`s are
themselves const, but the `Value`s are mutable.
A non-const member function implies that the object itself
can be modified but this doesn't make much sense considering
the return type: `Value * const * `, which is a pointer
to a constant array of pointers to mutable values.
This commit is contained in:
Sergei Zimmerman 2025-06-12 22:29:05 +00:00
parent c437e27abc
commit 7b46eb9958
No known key found for this signature in database
GPG key ID: A9B0B557CA632325

View file

@ -410,11 +410,6 @@ public:
return internalType == tList1 || internalType == tList2 || internalType == tListN; return internalType == tList1 || internalType == tList2 || internalType == tListN;
} }
Value * const * listElems()
{
return internalType == tList1 || internalType == tList2 ? payload.smallList : payload.bigList.elems;
}
std::span<Value * const> listItems() const std::span<Value * const> listItems() const
{ {
assert(isList()); assert(isList());