Open
Conversation
…ted to changed values only to circumvent problems like here: https://forums.x-plane.org/index.php?/forums/topic/232388-toliss-and-hardware-cockpit/
- removed blank line
removed spaces
vranki
reviewed
Mar 7, 2022
extplane-server/datarefs/dataref.h
Outdated
| typedef struct { | ||
| int lower; | ||
| int upper; | ||
| } indexPair; |
Owner
There was a problem hiding this comment.
I think you could just use a pair here:
using indexPair = std::pair<int>;
Then just use first and second instead of lower and upper.
vranki
approved these changes
Mar 7, 2022
Owner
vranki
left a comment
There was a problem hiding this comment.
LGTM, but you might check the small comment on converting a struct to pair before merging. I also assume you have tested this and it works.
Contributor
Author
|
Thanks for your suggestion, using std::pair makes it look even cleaner. I hope I will find some time to implement and test this end of this week :-) |
Was different here compared to FloatArrayDataref and caused X-Plane to crash.
…to scope-bound resource managed allocation instead of dynamic allocation for the list of pairs.
Contributor
Author
|
I tested my changes quite intensive and it works as expected (after locating and fixing the bug for the IntArrayDataref causing X-Plane to crash ;-)). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changed behaviour: Arrays are now written selectively. Only changed values of an array are written to X-Plane to circumvent problems like here: https://forums.x-plane.org/index.php?/forums/topic/232388-toliss-and-hardware-cockpit/