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
99d95d8e
Commit
99d95d8e
authored
Oct 02, 2019
by
Andy Maloney
Committed by
Jesse Beder
Oct 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass std::string by const ref (#749)
parent
a6ed66ab
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
include/yaml-cpp/emittermanip.h
+6
-6
include/yaml-cpp/exceptions.h
+1
-1
No files found.
include/yaml-cpp/emittermanip.h
View file @
99d95d8e
...
@@ -74,14 +74,14 @@ struct _Alias {
...
@@ -74,14 +74,14 @@ struct _Alias {
std
::
string
content
;
std
::
string
content
;
};
};
inline
_Alias
Alias
(
const
std
::
string
content
)
{
return
_Alias
(
content
);
}
inline
_Alias
Alias
(
const
std
::
string
&
content
)
{
return
_Alias
(
content
);
}
struct
_Anchor
{
struct
_Anchor
{
_Anchor
(
const
std
::
string
&
content_
)
:
content
(
content_
)
{}
_Anchor
(
const
std
::
string
&
content_
)
:
content
(
content_
)
{}
std
::
string
content
;
std
::
string
content
;
};
};
inline
_Anchor
Anchor
(
const
std
::
string
content
)
{
return
_Anchor
(
content
);
}
inline
_Anchor
Anchor
(
const
std
::
string
&
content
)
{
return
_Anchor
(
content
);
}
struct
_Tag
{
struct
_Tag
{
struct
Type
{
struct
Type
{
...
@@ -96,11 +96,11 @@ struct _Tag {
...
@@ -96,11 +96,11 @@ struct _Tag {
Type
::
value
type
;
Type
::
value
type
;
};
};
inline
_Tag
VerbatimTag
(
const
std
::
string
content
)
{
inline
_Tag
VerbatimTag
(
const
std
::
string
&
content
)
{
return
_Tag
(
""
,
content
,
_Tag
::
Type
::
Verbatim
);
return
_Tag
(
""
,
content
,
_Tag
::
Type
::
Verbatim
);
}
}
inline
_Tag
LocalTag
(
const
std
::
string
content
)
{
inline
_Tag
LocalTag
(
const
std
::
string
&
content
)
{
return
_Tag
(
""
,
content
,
_Tag
::
Type
::
PrimaryHandle
);
return
_Tag
(
""
,
content
,
_Tag
::
Type
::
PrimaryHandle
);
}
}
...
@@ -108,7 +108,7 @@ inline _Tag LocalTag(const std::string& prefix, const std::string content) {
...
@@ -108,7 +108,7 @@ inline _Tag LocalTag(const std::string& prefix, const std::string content) {
return
_Tag
(
prefix
,
content
,
_Tag
::
Type
::
NamedHandle
);
return
_Tag
(
prefix
,
content
,
_Tag
::
Type
::
NamedHandle
);
}
}
inline
_Tag
SecondaryTag
(
const
std
::
string
content
)
{
inline
_Tag
SecondaryTag
(
const
std
::
string
&
content
)
{
return
_Tag
(
""
,
content
,
_Tag
::
Type
::
NamedHandle
);
return
_Tag
(
""
,
content
,
_Tag
::
Type
::
NamedHandle
);
}
}
...
@@ -117,7 +117,7 @@ struct _Comment {
...
@@ -117,7 +117,7 @@ struct _Comment {
std
::
string
content
;
std
::
string
content
;
};
};
inline
_Comment
Comment
(
const
std
::
string
content
)
{
return
_Comment
(
content
);
}
inline
_Comment
Comment
(
const
std
::
string
&
content
)
{
return
_Comment
(
content
);
}
struct
_Precision
{
struct
_Precision
{
_Precision
(
int
floatPrecision_
,
int
doublePrecision_
)
_Precision
(
int
floatPrecision_
,
int
doublePrecision_
)
...
...
include/yaml-cpp/exceptions.h
View file @
99d95d8e
...
@@ -223,7 +223,7 @@ inline TypedKeyNotFound<T> MakeTypedKeyNotFound(const Mark& mark,
...
@@ -223,7 +223,7 @@ inline TypedKeyNotFound<T> MakeTypedKeyNotFound(const Mark& mark,
class
YAML_CPP_API
InvalidNode
:
public
RepresentationException
{
class
YAML_CPP_API
InvalidNode
:
public
RepresentationException
{
public
:
public
:
InvalidNode
(
std
::
string
key
)
InvalidNode
(
const
std
::
string
&
key
)
:
RepresentationException
(
Mark
::
null_mark
(),
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
INVALID_NODE_WITH_KEY
(
key
))
{}
ErrorMsg
::
INVALID_NODE_WITH_KEY
(
key
))
{}
InvalidNode
(
const
InvalidNode
&
)
=
default
;
InvalidNode
(
const
InvalidNode
&
)
=
default
;
...
...
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