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)
|
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::MaxValue)) {
|
||||||
if (value < static_cast<int>(TallyType::None) || value >= static_cast<int>(TallyType::Subtypes)) {
|
|
||||||
return TallyType::None;
|
return TallyType::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ enum class TallyType
|
||||||
{
|
{
|
||||||
None,
|
None,
|
||||||
Subtypes,
|
Subtypes,
|
||||||
|
MaxValue = Subtypes // sentinel value
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace Tally
|
namespace Tally
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue