[PR #15781] Remove IsValidStringBuffer helper #30731

Open
opened 2026-01-31 09:42:38 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15781

State: closed
Merged: Yes


This change is a fairly subjective one. It was done because
IsValidStringBuffer will very soon be the only function left
in cmdline.cpp. Removing it allows removing cmdline.cpp.
While the code that replaces it is somewhat tricky, it's also much
more straightforward, as the IsValidStringBuffer function didn't
just check if the string buffer is valid - it also retrieved the
pointers to each of the strings contained in the buffer.

Validation Steps Performed

Exhaustively covered by conhost feature tests

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15781 **State:** closed **Merged:** Yes --- This change is a fairly subjective one. It was done because `IsValidStringBuffer` will very soon be the only function left in `cmdline.cpp`. Removing it allows removing `cmdline.cpp`. While the code that replaces it is somewhat tricky, it's also much more straightforward, as the `IsValidStringBuffer` function didn't just check if the string buffer is valid - it also retrieved the pointers to each of the strings contained in the buffer. ## Validation Steps Performed Exhaustively covered by conhost feature tests ✅
claunia added the pull-request label 2026-01-31 09:42:38 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30731