Skip to content

Commit 87643f9

Browse files
committed
Merge pull request #4667 from bblanchon/patch-1
Speed and size improvement in Print::printFloat()
2 parents e12dcc6 + 9509587 commit 87643f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hardware/arduino/avr/cores/arduino/Print.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ size_t Print::printFloat(double number, uint8_t digits)
257257
while (digits-- > 0)
258258
{
259259
remainder *= 10.0;
260-
int toPrint = int(remainder);
260+
unsigned toPrint = unsigned(remainder);
261261
n += print(toPrint);
262262
remainder -= toPrint;
263263
}

0 commit comments

Comments
 (0)