mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-29 09:22:18 -07:00
fix guard
This commit is contained in:
parent
e0eb3278c9
commit
07f275a381
2 changed files with 2 additions and 2 deletions
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
TallyType Tally::intToType(int value)
|
||||
{
|
||||
// remember to change this whenever you add a new member
|
||||
if (value < static_cast<int>(TallyType::None) || value >= static_cast<int>(TallyType::Subtypes)) {
|
||||
if (value < static_cast<int>(TallyType::None) || value > static_cast<int>(TallyType::MaxValue)) {
|
||||
return TallyType::None;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ enum class TallyType
|
|||
{
|
||||
None,
|
||||
Subtypes,
|
||||
MaxValue = Subtypes // sentinel value
|
||||
};
|
||||
|
||||
namespace Tally
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue