-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
change default entry sector value from null #1731
Conversation
e001b7e
to
309cbf2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should not assign 0 or any valid portal ID. If you need to have this value uninitialized at the start, use std::optional
.
There's not necessarily a need for it to be uninitialized. The algorithm works fine no matter the value it starts with, which is why there's also no reason for it to be initialized in the first place; any initial value you choose is meaningless. |
This may be the case now but if we change the code and a bug is introduced that reads from the initial value 0, it might be really hard to debug since 0 is a valid ID. With |
309cbf2
to
28a6df3
Compare
28a6df3
to
775b3f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good!
closes #1730