diff --git a/Sources/Tools/MaxComponent/plResponderAnim.cpp b/Sources/Tools/MaxComponent/plResponderAnim.cpp index 3991749e4a..623b813645 100644 --- a/Sources/Tools/MaxComponent/plResponderAnim.cpp +++ b/Sources/Tools/MaxComponent/plResponderAnim.cpp @@ -118,7 +118,7 @@ enum kRespondRewindSound, kRespondFastForwardAnim, - kNumTypes = 16 + kNumTypes = 17 }; int plResponderCmdAnim::NumTypes() @@ -126,9 +126,9 @@ int plResponderCmdAnim::NumTypes() return kNumTypes; } -static int IndexToOldType(int idx) +static constexpr int IndexToOldType(int idx) { - static int oldTypes[] = + constexpr int oldTypes[] = { kRespondPlayAnim, kRespondStopAnim, @@ -152,6 +152,7 @@ static int IndexToOldType(int idx) kRespondFastForwardAnim, }; + static_assert(std::size(oldTypes) == kNumTypes, "ResponderAnim enumerations have differing lengths!"); hsAssert(idx < kNumTypes, "Bad index"); return oldTypes[idx]; }