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
Larger cleanup to input-related source files (this time using unique_ptr). #23
Larger cleanup to input-related source files (this time using unique_ptr). #23
Conversation
…erators that litter this section of the codebase. Also clean up a little bit of the comments that describe the interface classes.
…lass. Allows for the automatic handling of resource deallocation.
Changes a bunch of for+iterator loops into foreach loops.
Also cleaned up WiimoteEmu.h as well.
|
@BhaaLseN |
|
Ok, nvm then :) |
|
@BhaaLseN Actually, I'm not so sure. When I replied to your comment, I thought it was a general response, not a specific line comment :x. My bad. I think the current code in the initializer list is correct, but I'm open to being corrected. If anyone can clarify if it's necessary, that would be awesome. |
|
std::move is only needed when create a unique_ptr from another unique_ptr (and it will invalidate the previous unique_ptr - there can be only one unique_ptr pointing to an object). In this case it should be ok since the pointer is passed directly. Also, LGTM. |
|
@delroth Thanks for the clarification :) |
Larger cleanup to input-related source files (this time using unique_ptr).
Beta Version Changes from LittleCoaks
I took delroth's suggestion of using unique_ptr as well. However this required changes outside of InputComment to be done, and thus warranted it's own new branch (the previous one was called "small-inputcommon-cleanup" which would be inaccurate with the new changes)
This is open at the same time as PR #17 in case this one proves to be too messy (by opinion of course), then this one can be dropped and PR #17 can be used instead.
Anyway, feel free to point out anything that seems weird.