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

Fix cast function type warnings and base class constructor call #3291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BsAtHome
Copy link
Contributor

This PR solves the last of the function type cast warnings. These were caused by reusing a typedef of a function with wrong parameter types. The solution was to add the proper typedefs and use them. This does not change anything at the (binary) compiled code level because both typedef versions use a single pass-by-reference parameter and have the same return type.
BTW, the line-breaks are added to be consistent with the same format used a few lines down in the file (not seen in the diff).

Also fixed is a missing base-class constructor call in the copy constructor of the g7x class. The constructor call is silently added by the compiler when missing as it does not need any parameters to pass on. The data contained in the base-class is copied in the derived class copy-constructor. The proper way is to make base-class construction explicit, removing the warning it otherwise would generate.

Fix base-class constructor call from copy constructor.
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.

1 participant