Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate INPUT_RECORD based ApiRoutines #15605

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

lhecker
Copy link
Member

@lhecker lhecker commented Jun 26, 2023

(Peek|Read)ConsoleInput(A|W)Impl make a distinction that doesn't make
a lot of sense in our code base: On the calling side (ApiDispatchers)
there's just one function calling all 4 (ServerGetConsoleInput) and
on the callee side they all 4 just call _DoGetConsoleInput anyways.

Validation Steps Performed

  • It compiles ✅

@lhecker lhecker added Product-Conhost For issues in the Console codebase Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. labels Jun 26, 2023
@@ -22,8 +22,7 @@
// - THROW: Throws E_INVALIDARG for invalid pointers.
DirectReadData::DirectReadData(_In_ InputBuffer* const pInputBuffer,
_In_ INPUT_READ_HANDLE_DATA* const pInputReadHandleData,
const size_t eventReadCount,
_In_ std::deque<std::unique_ptr<IInputEvent>> partialEvents) :
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to remove this 4th parameter in a previous PR. I felt like this as good of a moment to remove it as any other.

@lhecker lhecker force-pushed the dev/lhecker/8000-ApiRoutines-cleanup branch from 967a521 to 288601e Compare June 26, 2023 15:06
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't believe (oh wait I can) that we would fan it out just to fan it back in. We used a giant switch to, through a number of other function calls, pass two booleans back into an omnifunction.
For heaven's sake.

@lhecker lhecker merged commit a596004 into main Jun 27, 2023
@lhecker lhecker deleted the dev/lhecker/8000-ApiRoutines-cleanup branch June 27, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-CodeHealth Issues related to code cleanliness, linting, rules, warnings, errors, static analysis, etc. Product-Conhost For issues in the Console codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants