Gravity icon indicating copy to clipboard operation
Gravity copied to clipboard

Use HashSet or flags for choices

Open Arithmomaniac opened this issue 6 years ago • 1 comments

Right now, a choice list is a List<T>. This doesn't ensure that the selected choices are unique, and could lead to strange behavior and/or failed API calls if a choice is added to the list multiple times.

We should use either flag enums instead (and then the choice list can just be of type T), or the choice list should be a HashSet<T> instead.

I favor using HashSet.

Arithmomaniac avatar Jun 08 '18 13:06 Arithmomaniac