-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix shadow variables #381
Fix shadow variables #381
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see what I expect....but it seems like certain models where updated. I like those changes, but will defer to @bocchino to determine if they are desired.
We don't want the m_ prefix in the member names. Those should correspond to the FPP member names. m_ is just for the C++ implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I reverted two changes: (1) I restored the old behavior of the toString conversion. The names of the logical struct variables are the names shown in FPP. The m_ names are only for the C++ implementation. (2) I restored the FPP variable names in the unit tests.
Thanks! I originally changed the names of the variables in the fpp files, because I thought we should not advise users to add a |
I think it's OK in the context of a unit test. In real code, a struct member name should say what the member does. In a unit test context, it seems fine to call a U32 member |
More details in nasa/fprime#2482
Fixes in the code generation to remove -Wshadow warnings:
m_
for fprime component member variables