Fix cast function type warnings and base class constructor call #3291
+13
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.