use static assert macro instead of keyword

This change fixes a linker error I noticed when compiling on my windows
sytstem. see #551

According to this link the macro is prefered to the keyword.
https://docs.microsoft.com/en-us/cpp/c-language/static-assert-c?view=msvc-170#:~:text=The%20_Static_assert%20keyword%2C%20and%20the%20static_assert%20macro%2C%20both,runtime%20and%20incur%20a%20runtime%20cost.%20Microsoft-specific%20behavior
This commit is contained in:
jascase901 2022-04-23 20:12:32 -07:00 committed by Bjorn
parent 218134d79c
commit aeb269b24a
1 changed files with 1 additions and 1 deletions

View File

@ -495,7 +495,7 @@ static bool openxr_init(float supersample, float offset, uint32_t msaa, bool ove
{ 0, NULL, "vibrate", XR_ACTION_TYPE_VIBRATION_OUTPUT, 2, hands, "Vibrate" }
};
_Static_assert(COUNTOF(actionInfo) == MAX_ACTIONS, "Unbalanced action table!");
static_assert(COUNTOF(actionInfo) == MAX_ACTIONS, "Unbalanced action table!");
if (!state.features.viveTrackers) {
actionInfo[ACTION_TRACKER_POSE].countSubactionPaths = 0;