mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
fix: fp_to_string uses now 2 spaces
This commit is contained in:

committed by
Jesse Beder

parent
d4e00bd473
commit
f4bca79dc4
@@ -197,8 +197,8 @@ inline auto FpToString(double v, size_t precision = 0) -> std::string {
|
|||||||
*/
|
*/
|
||||||
inline auto FpToString(long double v, size_t precision = std::numeric_limits<long double>::max_digits10) -> std::string {
|
inline auto FpToString(long double v, size_t precision = std::numeric_limits<long double>::max_digits10) -> std::string {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss.precision(precision);
|
|
||||||
ss.imbue(std::locale("C"));
|
ss.imbue(std::locale("C"));
|
||||||
|
ss.precision(precision);
|
||||||
ss << v;
|
ss << v;
|
||||||
return ss.str();
|
return ss.str();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user