🔨 cleanup

This commit is contained in:
Niels Lohmann 2017-08-13 20:57:27 +02:00
parent 7d19aed567
commit 08805f7f14
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69

View file

@ -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;
}
} }
} }