ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
8.75k stars 2.24k forks source link

NF: Use enum for flag everywhere possible #17434

Open Arthur-Milchior opened 1 week ago

Arthur-Milchior commented 1 week ago

It should be added that there is some ambiguity for the value of the flag. A flag could be either between 0 and 7, or an arbitrary int whose first 3 digits are the displayed flags.

Actually, the only time a number greater than 7 is generated, it's stored into the card's flags field, and never leave this object. So it's okay to use Flag object everywhere else.