🚨 fix warnings

parent e1607490
...@@ -32,7 +32,7 @@ number_float), because the library distinguishes these three types for numbers: ...@@ -32,7 +32,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 @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. 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 value with the default value for a given type
@since version 1.0.0 @since version 1.0.0
......
...@@ -5746,7 +5746,7 @@ class basic_json ...@@ -5746,7 +5746,7 @@ class basic_json
iterator result = insert_iterator(pos, cnt, val); iterator result = insert_iterator(pos, cnt, val);
for (size_type i = 0; i < cnt; ++i) 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; return result;
#else #else
...@@ -5815,7 +5815,7 @@ class basic_json ...@@ -5815,7 +5815,7 @@ class basic_json
// insert to array and return iterator // insert to array and return iterator
#if JSON_DIAGNOSTICS #if JSON_DIAGNOSTICS
iterator result = insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator); 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; (result + i)->m_parent = this;
} }
...@@ -5869,7 +5869,7 @@ class basic_json ...@@ -5869,7 +5869,7 @@ class basic_json
iterator result = insert_iterator(pos, ilist.begin(), ilist.end()); iterator result = insert_iterator(pos, ilist.begin(), ilist.end());
for (std::size_t i = 0; i < size; ++i) 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; return result;
#else #else
...@@ -8391,7 +8391,7 @@ class basic_json ...@@ -8391,7 +8391,7 @@ class basic_json
}; };
// wrapper for "add" operation; add value at ptr // 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 // adding to the root of the target document means replacing it
if (ptr.empty()) if (ptr.empty())
...@@ -8489,9 +8489,9 @@ class basic_json ...@@ -8489,9 +8489,9 @@ class basic_json
for (const auto& val : json_patch) for (const auto& val : json_patch)
{ {
// wrapper to get a value for an operation // wrapper to get a value for an operation
const auto get_value = [this, &val](const std::string & op, const auto get_value = [&val](const std::string & op,
const std::string & member, const std::string & member,
bool string_type) -> basic_json & bool string_type) -> basic_json &
{ {
// find value // find value
auto it = val.m_value.object->find(member); auto it = val.m_value.object->find(member);
......
...@@ -113,7 +113,7 @@ number_float), because the library distinguishes these three types for numbers: ...@@ -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 @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. 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 value with the default value for a given type
@since version 1.0.0 @since version 1.0.0
...@@ -22490,7 +22490,7 @@ class basic_json ...@@ -22490,7 +22490,7 @@ class basic_json
iterator result = insert_iterator(pos, cnt, val); iterator result = insert_iterator(pos, cnt, val);
for (size_type i = 0; i < cnt; ++i) 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; return result;
#else #else
...@@ -22559,7 +22559,7 @@ class basic_json ...@@ -22559,7 +22559,7 @@ class basic_json
// insert to array and return iterator // insert to array and return iterator
#if JSON_DIAGNOSTICS #if JSON_DIAGNOSTICS
iterator result = insert_iterator(pos, first.m_it.array_iterator, last.m_it.array_iterator); 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; (result + i)->m_parent = this;
} }
...@@ -22613,7 +22613,7 @@ class basic_json ...@@ -22613,7 +22613,7 @@ class basic_json
iterator result = insert_iterator(pos, ilist.begin(), ilist.end()); iterator result = insert_iterator(pos, ilist.begin(), ilist.end());
for (std::size_t i = 0; i < size; ++i) 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; return result;
#else #else
...@@ -25135,7 +25135,7 @@ class basic_json ...@@ -25135,7 +25135,7 @@ class basic_json
}; };
// wrapper for "add" operation; add value at ptr // 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 // adding to the root of the target document means replacing it
if (ptr.empty()) if (ptr.empty())
...@@ -25233,9 +25233,9 @@ class basic_json ...@@ -25233,9 +25233,9 @@ class basic_json
for (const auto& val : json_patch) for (const auto& val : json_patch)
{ {
// wrapper to get a value for an operation // wrapper to get a value for an operation
const auto get_value = [this, &val](const std::string & op, const auto get_value = [&val](const std::string & op,
const std::string & member, const std::string & member,
bool string_type) -> basic_json & bool string_type) -> basic_json &
{ {
// find value // find value
auto it = val.m_value.object->find(member); auto it = val.m_value.object->find(member);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment