mirror of
https://github.com/nlohmann/json.git
synced 2025-07-29 23:01:16 +03:00
some simplifications
This commit is contained in:
12
src/json.hpp
12
src/json.hpp
@ -1498,9 +1498,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_iterator begin() const noexcept
|
inline const_iterator begin() const noexcept
|
||||||
{
|
{
|
||||||
const_iterator result(this);
|
return cbegin();
|
||||||
result.set_begin();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1531,9 +1529,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_iterator end() const noexcept
|
inline const_iterator end() const noexcept
|
||||||
{
|
{
|
||||||
const_iterator result(this);
|
return cend();
|
||||||
result.set_end();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1562,7 +1558,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_reverse_iterator rbegin() const noexcept
|
inline const_reverse_iterator rbegin() const noexcept
|
||||||
{
|
{
|
||||||
return const_reverse_iterator(end());
|
return crbegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1580,7 +1576,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_reverse_iterator rend() const noexcept
|
inline const_reverse_iterator rend() const noexcept
|
||||||
{
|
{
|
||||||
return const_reverse_iterator(begin());
|
return crend();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -1498,9 +1498,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_iterator begin() const noexcept
|
inline const_iterator begin() const noexcept
|
||||||
{
|
{
|
||||||
const_iterator result(this);
|
return cbegin();
|
||||||
result.set_begin();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1531,9 +1529,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_iterator end() const noexcept
|
inline const_iterator end() const noexcept
|
||||||
{
|
{
|
||||||
const_iterator result(this);
|
return cend();
|
||||||
result.set_end();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1562,7 +1558,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_reverse_iterator rbegin() const noexcept
|
inline const_reverse_iterator rbegin() const noexcept
|
||||||
{
|
{
|
||||||
return const_reverse_iterator(end());
|
return crbegin();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1580,7 +1576,7 @@ class basic_json
|
|||||||
*/
|
*/
|
||||||
inline const_reverse_iterator rend() const noexcept
|
inline const_reverse_iterator rend() const noexcept
|
||||||
{
|
{
|
||||||
return const_reverse_iterator(begin());
|
return crend();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
Reference in New Issue
Block a user