From 974c4b7de8373fee1824d65255de2e083d5f5441 Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Sun, 27 Nov 2016 16:50:01 +0100 Subject: [PATCH] dda.c: simplify copy of startpoint. This reduces binary size by 26 bytes without drawback. ATmega sizes '168 '328(P) '644(P) '1280 Program: 19526 bytes 137% 64% 31% 16% Data: 2175 bytes 213% 107% 54% 27% EEPROM: 32 bytes 4% 2% 2% 1% --- dda.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dda.c b/dda.c index 3c7b99480..c707cc241 100644 --- a/dda.c +++ b/dda.c @@ -974,9 +974,6 @@ void update_current_position() { current_position.F = dda->endpoint.F; } else { - for (i = X; i < AXIS_COUNT; i++) { - current_position.axis[i] = startpoint.axis[i]; - } - current_position.F = startpoint.F; + memcpy(¤t_position, &startpoint, sizeof(TARGET)); } }