Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
8665e259
Commit
8665e259
authored
Oct 04, 2017
by
Perry Kundert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename get_string to move_string to imply side-effect
parent
e0d890cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/json.hpp
src/json.hpp
+4
-4
No files found.
src/json.hpp
View file @
8665e259
...
...
@@ -2702,8 +2702,8 @@ scan_number_done:
return
value_float
;
}
/// return
string value
std
::
string
get
_string
()
/// return
current string value (implicitly resets the token; useful only once)
std
::
string
move
_string
()
{
return
std
::
move
(
yytext
);
}
...
...
@@ -3004,7 +3004,7 @@ class parser
{
return
;
}
key
=
m_lexer
.
get
_string
();
key
=
m_lexer
.
move
_string
();
bool
keep_tag
=
false
;
if
(
keep
)
...
...
@@ -3142,7 +3142,7 @@ class parser
case
token_type
:
:
value_string
:
{
result
.
m_type
=
value_t
::
string
;
result
.
m_value
=
m_lexer
.
get
_string
();
result
.
m_value
=
m_lexer
.
move
_string
();
break
;
}
...
...
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