diff --git a/ColoredSquare.c b/ColoredSquare.c index 3b549c6..06a229b 100644 --- a/ColoredSquare.c +++ b/ColoredSquare.c @@ -15,13 +15,13 @@ void ColoredSquare_constructor (ColoredSquare *this, this->color = color; } -void ColoredSquare_copy (ColoredSquare *to, const ColoredSquare *from) +void ColoredSquare_copy (ColoredSquare *dest, const ColoredSquare *src) { printf ("ColoredSquare_copy (%lu, %lu) called\n", - (unsigned long) to, - (unsigned long) from); - Square_copy ((Square *) to, (Square *) from); - to->color = from->color; + (unsigned long) dest, + (unsigned long) src); + Square_copy ((Square *) dest, (Square *) src); + dest->color = src->color; } ColoredSquare* ColoredSquare_clone (const ColoredSquare *this) diff --git a/ColoredSquare.h b/ColoredSquare.h index c57e012..fc54ba1 100644 --- a/ColoredSquare.h +++ b/ColoredSquare.h @@ -24,7 +24,7 @@ typedef struct ColoredSquare_interface void ColoredSquare_constructor (struct ColoredSquare *this, double a, int color); -void ColoredSquare_copy (struct ColoredSquare *to, const struct ColoredSquare *from); +void ColoredSquare_copy (struct ColoredSquare *dest, const struct ColoredSquare *src); struct ColoredSquare* ColoredSquare_clone (const struct ColoredSquare *this); const char* ColoredSquare_type (const struct ColoredSquare *this); void ColoredSquare_draw (const struct ColoredSquare *this); diff --git a/Square.c b/Square.c index 83f298b..558ae6b 100644 --- a/Square.c +++ b/Square.c @@ -17,12 +17,12 @@ void Square_destructor (Square *this) (unsigned long) this); } -void Square_copy (Square *to, const Square *from) +void Square_copy (Square *dest, const Square *src) { printf ("Square_copy (%lu, %lu) called\n", - (unsigned long) to, - (unsigned long) from); - to->a = from->a; + (unsigned long) dest, + (unsigned long) src); + dest->a = src->a; } Square* Square_clone (const Square *this) diff --git a/Square.h b/Square.h index 253f681..49c057f 100644 --- a/Square.h +++ b/Square.h @@ -22,7 +22,7 @@ typedef struct Square_interface void Square_constructor (struct Square *this, double a); void Square_destructor (struct Square *this); -void Square_copy (struct Square *to, const struct Square *from); +void Square_copy (struct Square *dest, const struct Square *src); struct Square* Square_clone (const struct Square *this); void Square_destroy (struct Square *this); const char* Square_type (const struct Square *this);