From 4c84b3153697f82c096ddfa2460b7b3fe0169c1c Mon Sep 17 00:00:00 2001 From: Markus Hitter Date: Tue, 6 Mar 2012 12:36:30 +0100 Subject: [PATCH] gcode_parse.c, decfloat_to_int(): use a smaller variable. This saves 78 bytes and likely some processing time. --- gcode_parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcode_parse.c b/gcode_parse.c index 65fb295..c4a9f68 100644 --- a/gcode_parse.c +++ b/gcode_parse.c @@ -60,7 +60,7 @@ extern const uint32_t powers[]; // defined in sermsg.c /// /// Tested for up to 42'000 mm (accurate), 420'000 mm (precision 10 um) and /// 4'200'000 mm (precision 100 um). -static int32_t decfloat_to_int(decfloat *df, uint32_t multiplicand) { +static int32_t decfloat_to_int(decfloat *df, uint16_t multiplicand) { uint32_t r = df->mantissa; uint8_t e = df->exponent;