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

[Core] Correcting corner case in GeometricalObjectBins + typo ("avarage") #12016

Merged

Conversation

loumalouomega
Copy link
Member

📝 Description

Correcting corner case in GeometricalObjectBins, where due to the return clause, mNumberOfCells, mCellSizes and mInverseOfCellSize were not initialized.

🆕 Changelog

@loumalouomega loumalouomega added Kratos Core FastPR This Pr is simple and / or has been already tested and the revision should be fast Bugfix Corner case labels Feb 5, 2024
@loumalouomega loumalouomega requested a review from a team as a code owner February 5, 2024 16:36
Comment on lines +236 to +240
for (unsigned int i = 0; i < Dimension; i++) {
mNumberOfCells[i] = 0;
mCellSizes[i] = 0.0;
mInverseOfCellSize[i] = std::numeric_limits<double>::max();
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pooyan-dadvand change is this

mNumberOfCells[i] = 0;
mCellSizes[i] = 0.0;
mInverseOfCellSize[i] = std::numeric_limits<double>::max();
}
return;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Due to thgis return values were not initialized

Copy link
Member

@pooyan-dadvand pooyan-dadvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for finding it!

@loumalouomega loumalouomega merged commit 37d3533 into master Feb 5, 2024
15 of 17 checks passed
@loumalouomega loumalouomega deleted the core/correct-GeometricalObjectBins-corner-case branch February 5, 2024 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix Cleanup Corner case FastPR This Pr is simple and / or has been already tested and the revision should be fast Kratos Core Typo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants