-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed potential hang in PerimeterGenerator.cpp
- Loading branch information
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5b8ed73
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.
Why did you use an
unsigned short
in this file? (Some other places are still unsigned short.)It can works much slower (Typically, CPUs are fastest at operating on integers of their native word size) and this type can handle just ~65k.
P.S.Iterators are great;
5b8ed73
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.
I think nobody will use more than ~65k perimeters :-)
If it's slower, we can use int.