mirror of
https://github.com/nlohmann/json.git
synced 2026-06-03 11:29:45 +00:00
🚨 fix warnings
This commit is contained in:
@@ -113,7 +113,7 @@ number_float), because the library distinguishes these three types for numbers:
|
||||
@ref basic_json::number_float_t is used for floating-point numbers or to
|
||||
approximate integers which do not fit in the limits of their respective type.
|
||||
|
||||
@sa @ref basic_json::basic_json(const value_t value_type) -- create a JSON
|
||||
@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON
|
||||
value with the default value for a given type
|
||||
|
||||
@since version 1.0.0
|
||||
@@ -22490,7 +22490,7 @@ class basic_json
|
||||
iterator result = insert_iterator(pos, cnt, val);
|
||||
for (size_type i = 0; i < cnt; ++i)
|
||||
{
|
||||
(result + i)->m_parent = this;
|
||||
(result + static_cast<typename iterator::difference_type>(i))->m_parent = this;
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
@@ -22559,7 +22559,7 @@ class basic_json
|
||||
// insert to array and return iterator
|
||||
#if JSON_DIAGNOSTICS
|
||||
iterator result = insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator);
|
||||
for (std::size_t i = 0; i < std::distance(first, last); ++i)
|
||||
for (typename iterator::difference_type i = 0; i < std::distance(first, last); ++i)
|
||||
{
|
||||
(result + i)->m_parent = this;
|
||||
}
|
||||
@@ -22613,7 +22613,7 @@ class basic_json
|
||||
iterator result = insert_iterator(pos, ilist.begin(), ilist.end());
|
||||
for (std::size_t i = 0; i < size; ++i)
|
||||
{
|
||||
(result + i)->m_parent = this;
|
||||
(result + static_cast<typename iterator::difference_type>(i))->m_parent = this;
|
||||
}
|
||||
return result;
|
||||
#else
|
||||
@@ -25135,7 +25135,7 @@ class basic_json
|
||||
};
|
||||
|
||||
// wrapper for "add" operation; add value at ptr
|
||||
const auto operation_add = [this, &result](json_pointer & ptr, basic_json val)
|
||||
const auto operation_add = [&result](json_pointer & ptr, basic_json val)
|
||||
{
|
||||
// adding to the root of the target document means replacing it
|
||||
if (ptr.empty())
|
||||
@@ -25233,9 +25233,9 @@ class basic_json
|
||||
for (const auto& val : json_patch)
|
||||
{
|
||||
// wrapper to get a value for an operation
|
||||
const auto get_value = [this, &val](const std::string & op,
|
||||
const std::string & member,
|
||||
bool string_type) -> basic_json &
|
||||
const auto get_value = [&val](const std::string & op,
|
||||
const std::string & member,
|
||||
bool string_type) -> basic_json &
|
||||
{
|
||||
// find value
|
||||
auto it = val.m_value.object->find(member);
|
||||
|
||||
Reference in New Issue
Block a user