resolve some warnings

This commit is contained in:
James E. King III
2018-07-17 14:00:08 +00:00
parent 867cc5f0fc
commit 39f1cc0238
8 changed files with 21 additions and 12 deletions

View File

@ -29,9 +29,9 @@
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
template <int N>
int array_size(const char* (&p)[N])
size_t array_size(const char* (&p)[N])
{
for(int i = 0; i < N; ++i)
for(size_t i = 0; i < N; ++i)
if(p[i] == 0)
return i;
return N;