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

Cleanup pimpl idiom for net_plugin #1253

Merged
merged 3 commits into from
Jun 11, 2023
Merged

Cleanup pimpl idiom for net_plugin #1253

merged 3 commits into from
Jun 11, 2023

Conversation

greg7mdp
Copy link
Contributor

@greg7mdp greg7mdp commented Jun 8, 2023

Normally, for the pimpl idiom, the implementation resides in the private class, in our case net_plugin_impl.

Before this change, plugin_initialize and plugin_startup were defined in net_plugin, dereferencing members from net_plugin_impl through the my pointer.

This PR does not change what the code does, it should be 100% equivalent to what was there before (besides handle_sigup() being out of the try/catch block which I believe is inconsequential), however it moves the two member functions implementation within the net_plugin_impl class.

Also cleaned up connection::_close() which doesn't need to be static.

@greg7mdp greg7mdp requested review from heifner and vladtr June 8, 2023 14:41
@greg7mdp greg7mdp merged commit 990d2ea into main Jun 11, 2023
@greg7mdp greg7mdp deleted the cleanup_net_plugin_pimpl branch June 11, 2023 15:41
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.

3 participants