You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Casting from unsigned to signed types may lead to data loss or unexpected behavior if values exceed the range of the signed type. It is recommended to use std::ptrdiff_t or remain within unsigned arithmetic.
I went through the cases, where we did `cast<int>` from `std::size_t` and implemented solutions to avoid this.
closes:
- #3913
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved type safety in various algorithms by changing loop index types from `int` to `std::size_t`.
- Enhanced clarity in boundary condition checks within algorithms.
- **Documentation**
- Corrected comments for clarity in the `DigitizationAlgorithm` class.
- **Chores**
- Streamlined conditional logic in the `IndexedGridFiller` and `RefittingAlgorithm` classes for better readability and maintenance.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Casting from unsigned to signed types may lead to data loss or unexpected behavior if values exceed the range of the signed type. It is recommended to use std::ptrdiff_t or remain within unsigned arithmetic.
Pull Request: #3615
Comment: #3615 (comment)
Requested by @AJPfleger.
The text was updated successfully, but these errors were encountered: