-
Notifications
You must be signed in to change notification settings - Fork 44
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
Selective array writing #80
base: master
Are you sure you want to change the base?
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
extplane-server/datarefs/dataref.h
Outdated
typedef struct { | ||
int lower; | ||
int upper; | ||
} indexPair; |
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 think you could just use a pair here:
using indexPair = std::pair<int>;
Then just use first and second instead of lower and upper.
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.
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.
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.
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 ;-)). |
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/