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
3dca8668
Commit
3dca8668
authored
Jan 21, 2020
by
Ted Lyngmo
Committed by
Jesse Beder
Jan 20, 2020
Browse files
Change NULL to nullptr (#805)
parent
587b24e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
include/yaml-cpp/contrib/graphbuilder.h
include/yaml-cpp/contrib/graphbuilder.h
+4
-4
include/yaml-cpp/node/detail/node.h
include/yaml-cpp/node/detail/node.h
+2
-2
No files found.
include/yaml-cpp/contrib/graphbuilder.h
View file @
3dca8668
...
...
@@ -15,7 +15,7 @@ class Parser;
// GraphBuilderInterface
// . Abstraction of node creation
// . pParentNode is always
NULL
or the return value of one of the NewXXX()
// . pParentNode is always
nullptr
or the return value of one of the NewXXX()
// functions.
class
GraphBuilderInterface
{
public:
...
...
@@ -73,9 +73,9 @@ class GraphBuilder : public GraphBuilderInterface {
typedef
typename
Impl
::
Map
Map
;
GraphBuilder
(
Impl
&
impl
)
:
m_impl
(
impl
)
{
Map
*
pMap
=
NULL
;
Sequence
*
pSeq
=
NULL
;
Node
*
pNode
=
NULL
;
Map
*
pMap
=
nullptr
;
Sequence
*
pSeq
=
nullptr
;
Node
*
pNode
=
nullptr
;
// Type consistency checks
pNode
=
pMap
;
...
...
include/yaml-cpp/node/detail/node.h
View file @
3dca8668
...
...
@@ -119,7 +119,7 @@ class node {
template
<
typename
Key
>
node
*
get
(
const
Key
&
key
,
shared_memory_holder
pMemory
)
const
{
// NOTE: this returns a non-const node so that the top-level Node can wrap
// it, and returns a pointer so that it can be
NULL
(if there is no such
// it, and returns a pointer so that it can be
nullptr
(if there is no such
// key).
return
static_cast
<
const
node_ref
&>
(
*
m_pRef
).
get
(
key
,
pMemory
);
}
...
...
@@ -136,7 +136,7 @@ class node {
node
*
get
(
node
&
key
,
shared_memory_holder
pMemory
)
const
{
// NOTE: this returns a non-const node so that the top-level Node can wrap
// it, and returns a pointer so that it can be
NULL
(if there is no such
// it, and returns a pointer so that it can be
nullptr
(if there is no such
// key).
return
static_cast
<
const
node_ref
&>
(
*
m_pRef
).
get
(
key
,
pMemory
);
}
...
...
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