Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
78e911b8
Unverified
Commit
78e911b8
authored
Mar 19, 2020
by
Sergey Linev
Committed by
GitHub
Mar 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use array_idx as methods args
Avoid mix-up with array_index member Co-Authored-By:
Niels Lohmann
<
niels.lohmann@gmail.com
>
parent
00049c20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
json_pointer.hpp
include/nlohmann/detail/json_pointer.hpp
+8
-8
No files found.
include/nlohmann/detail/json_pointer.hpp
View file @
78e911b8
...
...
@@ -126,8 +126,8 @@ class json_pointer
/*!
@brief append an array index at the end of this JSON pointer
@param[in] array_i
n
dx array index to append
@return JSON pointer with @a array_i
n
dx appended
@param[in] array_idx array index to append
@return JSON pointer with @a array_idx appended
@liveexample{The example shows the usage of `operator/=`.,json_pointer__operator_add}
...
...
@@ -139,9 +139,9 @@ class json_pointer
@since version 3.6.0
*/
json_pointer
&
operator
/=
(
std
::
size_t
array_i
n
dx
)
json_pointer
&
operator
/=
(
std
::
size_t
array_idx
)
{
return
*
this
/=
std
::
to_string
(
array_i
n
dx
);
return
*
this
/=
std
::
to_string
(
array_idx
);
}
/*!
...
...
@@ -189,8 +189,8 @@ class json_pointer
@brief create a new JSON pointer by appending the array-index-token at the end of the JSON pointer
@param[in] ptr JSON pointer
@param[in] array_i
n
dx array index
@return a new JSON pointer with @a array_i
n
dx appended to @a ptr
@param[in] array_idx array index
@return a new JSON pointer with @a array_idx appended to @a ptr
@liveexample{The example shows the usage of `operator/`.,json_pointer__operator_add_binary}
...
...
@@ -200,9 +200,9 @@ class json_pointer
@since version 3.6.0
*/
friend
json_pointer
operator
/
(
const
json_pointer
&
ptr
,
std
::
size_t
array_i
n
dx
)
friend
json_pointer
operator
/
(
const
json_pointer
&
ptr
,
std
::
size_t
array_idx
)
{
return
json_pointer
(
ptr
)
/=
array_i
n
dx
;
return
json_pointer
(
ptr
)
/=
array_idx
;
}
/*!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment