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

Whitespace formatting in mavlink_main.cpp/h and begin migrating variable initialization. #11608

Merged
merged 1 commit into from
Mar 9, 2019

Conversation

mcsauder
Copy link
Contributor

@mcsauder mcsauder commented Mar 9, 2019

Describe problem solved by the proposed pull request
This PR continues work started in PR #11580 to cleanup formatting in mavlink_main.cpp/h and migrate variable initialization from the Mavlink class constructor list to the variable declarations. This PR is predominantly whitespace changes with only a few var initialization instances added into mavlink_main.h. Additional step-by-step work will follow this PR to complete the migration.

Additional context
This work was started in PR #11580.

Please let me know if you have any questions on this PR. Thanks!

-Mark

@mcsauder mcsauder force-pushed the mavlink_main_var_initialization_part_2 branch 2 times, most recently from 57d1dd2 to dfb468a Compare March 9, 2019 17:03
*/
int get_component_id() const { return mavlink_system.compid; }

const char *_device_name;
const char *_device_name{DEFAULT_DEVICE_NAME};
Copy link
Member

Choose a reason for hiding this comment

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

Isn't this still set in the constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left the inits in the constructor in this PR to make the diff a little simpler. I relalize that it's repetitively redundant at the moment but I was aiming to keep the diff as easy as possible to verify the values in this PR. I can deprecate as I migrate, give me a minute and I'll have that pushed up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The vars that are initialized at declaration in this PR are no longer in the constructor list. Thanks for your review!

…riable initialization at declaration in mavlink_main.h.
@mcsauder mcsauder force-pushed the mavlink_main_var_initialization_part_2 branch from dfb468a to bce9d05 Compare March 9, 2019 17:54
@dagar dagar merged commit 7b3482a into PX4:master Mar 9, 2019
@mcsauder
Copy link
Contributor Author

mcsauder commented Mar 9, 2019

Thanks @dagar !

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