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
774f2580
Commit
774f2580
authored
Sep 25, 2018
by
dand-oss
Committed by
Jesse Beder
Sep 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up static, so works as DLL (#559)
* fix up static, so works as DLL
parent
ca77ef71
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
include/yaml-cpp/node/detail/node_data.h
+1
-1
include/yaml-cpp/node/impl.h
+2
-2
src/node_data.cpp
+4
-1
No files found.
include/yaml-cpp/node/detail/node_data.h
View file @
774f2580
...
@@ -81,7 +81,7 @@ class YAML_CPP_API node_data {
...
@@ -81,7 +81,7 @@ class YAML_CPP_API node_data {
shared_memory_holder
pMemory
);
shared_memory_holder
pMemory
);
public
:
public
:
static
std
::
string
empty_scalar
;
static
const
std
::
string
&
empty_scalar
()
;
private
:
private
:
void
compute_seq_size
()
const
;
void
compute_seq_size
()
const
;
...
...
include/yaml-cpp/node/impl.h
View file @
774f2580
...
@@ -156,13 +156,13 @@ inline T Node::as(const S& fallback) const {
...
@@ -156,13 +156,13 @@ inline T Node::as(const S& fallback) const {
inline
const
std
::
string
&
Node
::
Scalar
()
const
{
inline
const
std
::
string
&
Node
::
Scalar
()
const
{
if
(
!
m_isValid
)
if
(
!
m_isValid
)
throw
InvalidNode
();
throw
InvalidNode
();
return
m_pNode
?
m_pNode
->
scalar
()
:
detail
::
node_data
::
empty_scalar
;
return
m_pNode
?
m_pNode
->
scalar
()
:
detail
::
node_data
::
empty_scalar
()
;
}
}
inline
const
std
::
string
&
Node
::
Tag
()
const
{
inline
const
std
::
string
&
Node
::
Tag
()
const
{
if
(
!
m_isValid
)
if
(
!
m_isValid
)
throw
InvalidNode
();
throw
InvalidNode
();
return
m_pNode
?
m_pNode
->
tag
()
:
detail
::
node_data
::
empty_scalar
;
return
m_pNode
?
m_pNode
->
tag
()
:
detail
::
node_data
::
empty_scalar
()
;
}
}
inline
void
Node
::
SetTag
(
const
std
::
string
&
tag
)
{
inline
void
Node
::
SetTag
(
const
std
::
string
&
tag
)
{
...
...
src/node_data.cpp
View file @
774f2580
...
@@ -13,7 +13,10 @@
...
@@ -13,7 +13,10 @@
namespace
YAML
{
namespace
YAML
{
namespace
detail
{
namespace
detail
{
std
::
string
node_data
::
empty_scalar
;
const
std
::
string
&
node_data
::
empty_scalar
()
{
static
const
std
::
string
svalue
;
return
svalue
;
}
node_data
::
node_data
()
node_data
::
node_data
()
:
m_isDefined
(
false
),
:
m_isDefined
(
false
),
...
...
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