Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
yaml-cpp
Commits
99d95d8e
"profiler/vscode:/vscode.git/clone" did not exist on "4026fced1c85160f9879710fc676cf86ad30cbeb"
Commit
99d95d8e
authored
Oct 02, 2019
by
Andy Maloney
Committed by
Jesse Beder
Oct 02, 2019
Browse files
Pass std::string by const ref (#749)
parent
a6ed66ab
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
include/yaml-cpp/emittermanip.h
include/yaml-cpp/emittermanip.h
+6
-6
include/yaml-cpp/exceptions.h
include/yaml-cpp/exceptions.h
+1
-1
No files found.
include/yaml-cpp/emittermanip.h
View file @
99d95d8e
...
...
@@ -74,14 +74,14 @@ struct _Alias {
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
{
_Anchor
(
const
std
::
string
&
content_
)
:
content
(
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
Type
{
...
...
@@ -96,11 +96,11 @@ struct _Tag {
Type
::
value
type
;
};
inline
_Tag
VerbatimTag
(
const
std
::
string
content
)
{
inline
_Tag
VerbatimTag
(
const
std
::
string
&
content
)
{
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
);
}
...
...
@@ -108,7 +108,7 @@ inline _Tag LocalTag(const std::string& prefix, const std::string content) {
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
);
}
...
...
@@ -117,7 +117,7 @@ struct _Comment {
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
{
_Precision
(
int
floatPrecision_
,
int
doublePrecision_
)
...
...
include/yaml-cpp/exceptions.h
View file @
99d95d8e
...
...
@@ -223,7 +223,7 @@ inline TypedKeyNotFound<T> MakeTypedKeyNotFound(const Mark& mark,
class
YAML_CPP_API
InvalidNode
:
public
RepresentationException
{
public:
InvalidNode
(
std
::
string
key
)
InvalidNode
(
const
std
::
string
&
key
)
:
RepresentationException
(
Mark
::
null_mark
(),
ErrorMsg
::
INVALID_NODE_WITH_KEY
(
key
))
{}
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