Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6f3d25e

Browse files
Merge pull request #4667 from bblanchon/patch-1
Speed and size improvement in Print::printFloat()
2 parents 0fd6502 + 437eabe commit 6f3d25e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎cores/arduino/Print.cpp‎

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /