🔨 cleanup
This commit is contained in:
parent
7d19aed567
commit
08805f7f14
1 changed files with 4 additions and 7 deletions
11
src/json.hpp
11
src/json.hpp
|
@ -29,7 +29,7 @@ SOFTWARE.
|
||||||
#ifndef NLOHMANN_JSON_HPP
|
#ifndef NLOHMANN_JSON_HPP
|
||||||
#define NLOHMANN_JSON_HPP
|
#define NLOHMANN_JSON_HPP
|
||||||
|
|
||||||
#include <algorithm> // all_of, copy, fill, find, for_each, none_of, remove, reverse, transform
|
#include <algorithm> // all_of, copy, fill, find, for_each, generate_n, none_of, remove, reverse, transform
|
||||||
#include <array> // array
|
#include <array> // array
|
||||||
#include <cassert> // assert
|
#include <cassert> // assert
|
||||||
#include <ciso646> // and, not, or
|
#include <ciso646> // and, not, or
|
||||||
|
@ -6605,13 +6605,10 @@ class serializer
|
||||||
// convert decimal point to '.'
|
// convert decimal point to '.'
|
||||||
if (decimal_point != '\0' and decimal_point != '.')
|
if (decimal_point != '\0' and decimal_point != '.')
|
||||||
{
|
{
|
||||||
for (auto& c : number_buffer)
|
const auto dec_pos = std::find(number_buffer.begin(), number_buffer.end(), decimal_point);
|
||||||
|
if (dec_pos != number_buffer.end())
|
||||||
{
|
{
|
||||||
if (c == decimal_point)
|
*dec_pos = '.';
|
||||||
{
|
|
||||||
c = '.';
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue