From a8a00b2ec00d28e154ee32b63200304afb52517e Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Wed, 6 Jul 2011 13:38:26 +0200 Subject: [PATCH] refactor get_pos to move result holder at the end of the parameters --- star.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/star.c b/star.c index e88e005..3d7cd4f 100644 --- a/star.c +++ b/star.c @@ -315,7 +315,7 @@ int count_gifts( struct state *s ) /* Write the position of actor into pos */ -void get_pos( struct state *s, int* pos, cell actor ) +void get_pos( struct state *s, cell actor, int* pos ) { int p; @@ -436,7 +436,7 @@ void make_a_move( struct state *s, direction where ) { int motion[ 2 ] = { 0, 0 }; int item_coord[ 2 ]; - get_pos( s, item_coord, s->moving ); /* get the coordinates of the moving actor */ + get_pos( s, s->moving, item_coord ); /* get the coordinates of the moving actor */ /* Setup the motion vector according to direction.*/ switch( where ) {