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:
parent
c437e27abc
commit
7b46eb9958
1 changed files with 0 additions and 5 deletions
|
@ -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());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue