From e24127771e21298c541dbe9dc4491d85eb8b715e Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Sat, 17 Mar 2012 18:06:22 +0000 Subject: [trunk] Fix numerous warnings about signed vs unsigned comparison. Adapt opj_procedure type to what it should hev been IMHO. Start using PRIi64 for printf and int64_t --- libopenjpeg/function_list.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'libopenjpeg/function_list.h') diff --git a/libopenjpeg/function_list.h b/libopenjpeg/function_list.h index 19339138..418f8277 100644 --- a/libopenjpeg/function_list.h +++ b/libopenjpeg/function_list.h @@ -44,12 +44,9 @@ struct opj_jp2; /** - * ARGGGG, when will the template be added to the C language ??? - * in order not to have to duplicate the code in a vast number of times, use void * and downcast - * it after => UGLY but faster and easier - * TODO : make the class template in C++, use STL vector or duplicate code for each procedure type. + * declare a function pointer */ -typedef void * opj_procedure; +typedef void (*opj_procedure)(void); /** * A list of procedures. @@ -95,7 +92,7 @@ void opj_procedure_list_destroy(opj_procedure_list_t * p_list); * * @return true if the procedure could ne added. */ -opj_bool opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure); +opj_bool opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure); /** * Gets the number of validation procedures. -- cgit v1.2.3