Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yaml-cpp
Overview
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
lvzhengyang
yaml-cpp
Commits
c73ee347
Unverified
Commit
c73ee347
authored
Jun 01, 2022
by
Igor [hyperxor]
Committed by
GitHub
May 31, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small perfomance optimization in Directives and Tag methods (#1112)
parent
190ad502
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
4 deletions
+4
-4
src/directives.cpp
+1
-1
src/directives.h
+1
-1
src/tag.cpp
+1
-1
src/tag.h
+1
-1
No files found.
src/directives.cpp
View file @
c73ee347
...
...
@@ -3,7 +3,7 @@
namespace
YAML
{
Directives
::
Directives
()
:
version
{
true
,
1
,
2
},
tags
{}
{}
const
std
::
string
Directives
::
TranslateTagHandle
(
std
::
string
Directives
::
TranslateTagHandle
(
const
std
::
string
&
handle
)
const
{
auto
it
=
tags
.
find
(
handle
);
if
(
it
==
tags
.
end
())
{
...
...
src/directives.h
View file @
c73ee347
...
...
@@ -19,7 +19,7 @@ struct Version {
struct
Directives
{
Directives
();
const
std
::
string
TranslateTagHandle
(
const
std
::
string
&
handle
)
const
;
std
::
string
TranslateTagHandle
(
const
std
::
string
&
handle
)
const
;
Version
version
;
std
::
map
<
std
::
string
,
std
::
string
>
tags
;
...
...
src/tag.cpp
View file @
c73ee347
...
...
@@ -29,7 +29,7 @@ Tag::Tag(const Token& token)
}
}
const
std
::
string
Tag
::
Translate
(
const
Directives
&
directives
)
{
std
::
string
Tag
::
Translate
(
const
Directives
&
directives
)
{
switch
(
type
)
{
case
VERBATIM
:
return
value
;
...
...
src/tag.h
View file @
c73ee347
...
...
@@ -23,7 +23,7 @@ struct Tag {
};
Tag
(
const
Token
&
token
);
const
std
::
string
Translate
(
const
Directives
&
directives
);
std
::
string
Translate
(
const
Directives
&
directives
);
TYPE
type
;
std
::
string
handle
,
value
;
...
...
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