We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95dc689 commit a82417dCopy full SHA for a82417d
1 file changed
includes/sjson/parser.h
@@ -64,6 +64,15 @@ namespace sjson
64
return ::strtoll(str, endptr, base);
65
#else
66
return std::strtoll(str, endptr, base);
67
+#endif
68
+ }
69
+
70
+ inline float strtof(const char* str, char** endptr)
71
+ {
72
+#if defined(__ANDROID__)
73
+ return ::strtof(str, endptr);
74
+#else
75
+ return std::strtof(str, endptr);
76
#endif
77
}
78
@@ -749,7 +758,7 @@ namespace sjson
749
758
if (dbl_value != nullptr)
750
759
*dbl_value = std::strtod(slice, &last_used_symbol);
751
760
else
752
- *flt_value = std::strtof(slice, &last_used_symbol);
761
+ *flt_value = impl::strtof(slice, &last_used_symbol);
753
762
754
763
if (last_used_symbol != slice + length)
755
764
{
0 commit comments