X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=UDI%2Fdrivers%2Fhelpers_gfx.h;fp=UDI%2Fdrivers%2Fhelpers_gfx.h;h=999a4082ba674e0e5e3ea056ac48f7ed8d29cabb;hb=b89845fd0e4bde75a360e66bb6bd51b062039d60;hp=f4d9bcff65d0872598819c67ae8d0a828322de4d;hpb=da9bc578f6b13ef2f78a3ffaf467698836250e53;p=tpg%2Facess2.git diff --git a/UDI/drivers/helpers_gfx.h b/UDI/drivers/helpers_gfx.h index f4d9bcff..999a4082 100644 --- a/UDI/drivers/helpers_gfx.h +++ b/UDI/drivers/helpers_gfx.h @@ -6,6 +6,10 @@ #ifndef _HELPERS_GFX_H_ #define _HELPERS_GFX_H_ +#if __STDC_VERSION__ < 199901L +# define inline +#endif + typedef struct { udi_index_t op; udi_ubit32_t arg_1; @@ -18,22 +22,6 @@ typedef struct { const gfxhelpers_op_t *ops; } gfxhelpers_op_map_t; -static inline udi_ubit32_t gfxhelpers_get_engine_op( - const gfxhelpers_op_map_t *map, udi_index_t index, udi_index_t prop - ) -{ - if( index >= map->op_count ) { - return 0; - } - switch(prop) { - case UDI_GFX_PROP_OPERATOR_OPCODE: return map->ops[index].op; - case UDI_GFX_PROP_OPERATOR_ARG_1: return map->ops[index].arg_1; - case UDI_GFX_PROP_OPERATOR_ARG_2: return map->ops[index].arg_2; - case UDI_GFX_PROP_OPERATOR_ARG_3: return map->ops[index].arg_3; - } - return 0; -} - static inline void gfxhelpers_return_range_simple( udi_gfx_range_connector_ack_op_t *callback, udi_gfx_range_cb_t *cb, udi_ubit32_t min, udi_ubit32_t max, udi_ubit32_t step