Skip to content

Commit b06b751

Browse files
authored
Merge pull request #11829 from martinbudden/fix_float_conversion_warning
fix(esp32): float conversion warning in String::toFloat
2 parents dab6569 + 7f3e703 commit b06b751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/esp32/WString.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ long String::toInt(void) const {
910910

911911
float String::toFloat(void) const {
912912
if (buffer()) {
913-
return atof(buffer());
913+
return static_cast<float>(atof(buffer()));
914914
}
915915
return 0;
916916
}

0 commit comments

Comments
 (0)