mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-11 19:17:33 +00:00
Initialize parse output in string_to_double_decimal_point
This commit is contained in:
@@ -53,7 +53,7 @@ bool is_decimal_separator_point()
|
|||||||
|
|
||||||
double string_to_double_decimal_point(const std::string_view str, size_t* pos /* = nullptr*/)
|
double string_to_double_decimal_point(const std::string_view str, size_t* pos /* = nullptr*/)
|
||||||
{
|
{
|
||||||
double out;
|
double out = 0.;
|
||||||
size_t p = fast_float::from_chars(str.data(), str.data() + str.size(), out).ptr - str.data();
|
size_t p = fast_float::from_chars(str.data(), str.data() + str.size(), out).ptr - str.data();
|
||||||
if (pos)
|
if (pos)
|
||||||
*pos = p;
|
*pos = p;
|
||||||
|
|||||||
Reference in New Issue
Block a user