Skip to content

General cleanups for masternodes and main #77

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

Merged
merged 2 commits into from
Apr 7, 2021

Conversation

domob1812
Copy link

This contains two commits with general cleanups and refactorings to main and the masternode config logic, which have been split out of the other PRs like #65 and #44. This contains just very basic stuff, like marking methods as const where possible, using const& to pass arguments and moving helper functions into anonymous namespaces inside the source file instead of declaring them in the header.

Wrap some of the functions used only in main into an anonymous namespace;
some of them were already marked as "static", others were not (but they
were still not needed from anywhere else).

This makes it immediately clear that those functions are only used in the
context of main.

FindUndoPos had a declaration first and the definition later, but it is
fine to just move the definition to where the declaration was.  This
simplifies the code further (and is a pure move in the context of
this commit).
This is a bunch of related and straight-forward cleanups to the code
around masternode configuration:  Pass arguments as const& instead of
by value, mark functions as const, and move helper functions from
being static in a class and declared inside the header to just being
inside an anonymous namespace in the cpp file.
@galpHub galpHub merged commit 77d17ee into DiviProject:Development Apr 7, 2021
@domob1812 domob1812 deleted the split-out-refactor branch April 8, 2021 11:37
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.

2 participants