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

Remove superfluous buffer #787

Merged
merged 1 commit into from
May 19, 2023
Merged

Remove superfluous buffer #787

merged 1 commit into from
May 19, 2023

Conversation

nerai
Copy link
Contributor

@nerai nerai commented May 16, 2023

It is cleared anyway, so it can just as well be put on the stack.

It is cleared anyway, so it can just as well be put on the stack.
@lightvector
Copy link
Owner

Thanks. Is there a reason to do

bool posesWithChildBuf[NNPos::MAX_NN_POLICY_SIZE] = { false, }; // Initialize the first value explicitly to false, and all other values by default to false

instead of this?

bool posesWithChildBuf[NNPos::MAX_NN_POLICY_SIZE] = {}; // Initialize all to false

@lightvector lightvector merged commit 2f413ca into lightvector:master May 19, 2023
@nerai
Copy link
Contributor Author

nerai commented May 24, 2023

Thanks. Is there a reason to do

bool posesWithChildBuf[NNPos::MAX_NN_POLICY_SIZE] = { false, }; // Initialize the first value explicitly to false, and all other values by default to false

instead of this?

bool posesWithChildBuf[NNPos::MAX_NN_POLICY_SIZE] = {}; // Initialize all to false

@lightvector I am sorry, I missed your response. No, in fact I prefer your version.

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.

2 participants