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

Switch to function pointers #15233

Merged
merged 2 commits into from
Apr 25, 2023

Conversation

zadjii-msft
Copy link
Member

Apparently, std::function is bad and we should feel bad. I friggen hate the c++ function pointer syntax, but I do what I'm told

I missed this comment in #15020. Sorry!

Apparently, `std::function` is bad and we should feel bad. I friggen hate the c++ function pointer syntax, but [I do what I'm told](https://getyarn.io/yarn-clip/85c318d8-f4a7-4da6-ae20-23d7b737e71c)

I missed this comment in #15020. Sorry!
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.

Sorry I badgered you

Comment on lines 2314 to 2315
bool (*filter)(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::ScrollMark&),
til::point_span (*getSpan)(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::ScrollMark&))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bool (*filter)(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::ScrollMark&),
til::point_span (*getSpan)(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::ScrollMark&))
bool (*filter)(const DispatchTypes::ScrollMark&),
til::point_span (*getSpan)(const DispatchTypes::ScrollMark&))

@@ -2358,7 +2358,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation

bool ControlCore::_clickedOnMark(
const til::point& pos,
const std::function<bool(const DispatchTypes::ScrollMark&)>& filter)
bool (*filter)(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::ScrollMark&))
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
bool (*filter)(const ::Microsoft::Console::VirtualTerminal::DispatchTypes::ScrollMark&))
bool (*filter)(const DispatchTypes::ScrollMark&))

@zadjii-msft zadjii-msft enabled auto-merge (squash) April 25, 2023 19:51
@zadjii-msft zadjii-msft merged commit 06dc975 into main Apr 25, 2023
@zadjii-msft zadjii-msft deleted the dev/migrie/b/std-function-considered-harmful branch April 25, 2023 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants