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.

(cherry picked from commit 7b46eb9958)
This commit is contained in:
Sergei Zimmerman authored and Mergify committed 2025-07-30 12:54:28 +00:00
1 parent bab4e58a5e
commit 4f105e7c7d
1 file changed
-5
-5
View File
@@ -451,11 +451,6 @@ public:
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
{
assert(isList());