[qfcc] Add is_entity type test helper

This commit is contained in:
Bill Currie 2020-03-16 21:07:31 +09:00
parent ede7dd6d7e
commit 5c0c056e2c
2 changed files with 9 additions and 0 deletions

View file

@ -162,6 +162,7 @@ int is_quaternion (const type_t *type) __attribute__((pure));
int is_math (const type_t *type) __attribute__((pure));
int is_pointer (const type_t *type) __attribute__((pure));
int is_field (const type_t *type) __attribute__((pure));
int is_entity (const type_t *type) __attribute__((pure));
int is_struct (const type_t *type) __attribute__((pure));
int is_array (const type_t *type) __attribute__((pure));
int is_structural (const type_t *type) __attribute__((pure));

View file

@ -811,6 +811,14 @@ is_field (const type_t *type)
return 0;
}
int
is_entity (const type_t *type)
{
if (type->type == ev_entity)
return 1;
return 0;
}
int
is_array (const type_t *type)
{