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

Fix refactoring crash #1993

Merged
merged 2 commits into from
Dec 4, 2023
Merged

Fix refactoring crash #1993

merged 2 commits into from
Dec 4, 2023

Conversation

wawanbreton
Copy link
Contributor

@wawanbreton wawanbreton commented Dec 4, 2023

During refactory, the NO_INDEX macro was changed to avoid a warning of casting -1 to an unsigned int. In some cases, this would create a regression because unsigned int type is used instead of size_t.

Fix 1: In the specific buggy situation, use std::optional instead of NO_INDEX
Fix 2: To avoid other similar situations, ensure that NO_INDEX is always used with size_t type

On longer term, we should remove the NO_INDEX macro and use std::optional instead.

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Unit Test Results

26 tests  ±0   26 ✔️ ±0   6s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ±0 

Results for commit 126c2ea. ± Comparison against base commit 02190bd.

@casperlamboo casperlamboo merged commit 5c2ebd8 into main Dec 4, 2023
13 of 15 checks passed
@casperlamboo casperlamboo deleted the fix_refactoring_crash branch December 4, 2023 13:50
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