Add _countof when not compiling with MSVS

This commit is contained in:
William Hjelm 2022-09-23 14:26:57 +02:00 committed by GitHub
parent f8b3d1b2c3
commit a771a9247f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,14 @@
#include "ffx_fsr2_maximum_bias.h"
#ifndef _MSC_VER
template < typename T, size_t N >
size_t _countof(T(&arr)[N])
{
return std::extent< T[N] >::value;
}
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wunused-variable"
#endif