[Audit] Fix suppressed return of std::wstring_view& from OutputCellView #3762

Open
opened 2026-01-30 23:29:35 +00:00 by claunia · 0 comments
Owner

Originally created by @miniksa on GitHub (Sep 6, 2019).

During audit, I had to suppress a warning related to returning a reference to a wstring_view.

This is because of the weird relationship that exists between TextBufferTextIterator and TextBufferCellIterator. The Text iterator needs the wstring_view stored somewhere or it won't return the right thing with its weird operator->.

The fact that this is flagged and awkward indicates a bad design that should be revisited. There has to be a better way.

Originally created by @miniksa on GitHub (Sep 6, 2019). During audit, I had to suppress a warning related to returning a reference to a wstring_view. This is because of the weird relationship that exists between `TextBufferTextIterator` and `TextBufferCellIterator`. The Text iterator needs the `wstring_view` stored *somewhere* or it won't return the right thing with its weird `operator->`. The fact that this is flagged and awkward indicates a bad design that should be revisited. There has to be a better way.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#3762