diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-09-04 09:15:10 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-09-04 09:15:10 -0400 |
commit | d67ad5da3b5a37f7b4cb78e686ae36f31c513153 (patch) | |
tree | 5175159479d797101bfebd738d9c55d0f5b457f2 /indra/newview/lllandmarklist.cpp | |
parent | 35c3f0227c334e059abdc36c36cc942a517d92ec (diff) |
`result_view()`'s table's `close()` method need not be further wrapped.
`LL.setdtor(desc, table, func)` eventually calls `func(table)`. So the
`close()` method on the table returned by `result_view()` can be directly
passed to `setdtor()`, instead of wrapped in a new anonymous function whose
only job is to pass the table to it.
Moreover, there's no need for the table returned by LLInventory.lua's
`result()` function to lazily instantiate the `result_view()` for `categories`
or `items`: neither `result_view` will fetch a slice unless asked. Just return
`{categories=result_view(...), items=result_view(...), close=...}`. This
dramatically simplifies the `result()` function.
Since that table also defines a `close()` function, that too can be passed
directly to `setdtor()` without being wrapped in a new anonymous function.
Diffstat (limited to 'indra/newview/lllandmarklist.cpp')
0 files changed, 0 insertions, 0 deletions