Avoid of incompatible types in static vtables.
This commit is contained in:
parent
a00305f0be
commit
34484b9910
|
@ -71,14 +71,14 @@ ColoredSquare* ColoredSquare_new (double a, int color)
|
|||
{
|
||||
static ColoredSquare_interface vtable =
|
||||
{
|
||||
(void* (*) (void *)) ColoredSquare_clone,
|
||||
(void (*) (void *)) Square_destroy,
|
||||
(const char* (*) (Figure *)) ColoredSquare_type,
|
||||
(void (*) (Figure *)) ColoredSquare_draw,
|
||||
(double (*) (Figure *)) Square_area,
|
||||
Square_resize,
|
||||
Square_diag_length,
|
||||
ColoredSquare_set_color
|
||||
(void* (*) (void *)) ColoredSquare_clone,
|
||||
(void (*) (void *)) Square_destroy,
|
||||
(const char* (*) (Figure *)) ColoredSquare_type,
|
||||
(void (*) (Figure *)) ColoredSquare_draw,
|
||||
(double (*) (Figure *)) Square_area,
|
||||
Square_resize,
|
||||
Square_diag_length,
|
||||
ColoredSquare_set_color
|
||||
};
|
||||
ColoredSquare *square = malloc (sizeof (*square));
|
||||
|
||||
|
|
14
Square.c
14
Square.c
|
@ -102,13 +102,13 @@ Square* Square_new (double a)
|
|||
{
|
||||
static Square_interface vtable =
|
||||
{
|
||||
(void* (*) (void *)) Square_clone,
|
||||
(void (*) (void *)) Square_destroy,
|
||||
(const char* (*) (Figure *)) Square_type,
|
||||
(void (*) (Figure *)) Square_draw,
|
||||
(double (*) (Figure *)) Square_area,
|
||||
Square_resize,
|
||||
Square_diag_length
|
||||
(void* (*) (void *)) Square_clone,
|
||||
(void (*) (void *)) Square_destroy,
|
||||
(const char* (*) (Figure *)) Square_type,
|
||||
(void (*) (Figure *)) Square_draw,
|
||||
(double (*) (Figure *)) Square_area,
|
||||
Square_resize,
|
||||
Square_diag_length
|
||||
};
|
||||
Square *square = malloc (sizeof (*square));
|
||||
|
||||
|
|
Loading…
Reference in New Issue