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
13130ec2
Commit
13130ec2
authored
Mar 25, 2014
by
Jesse Beder
Browse files
clang-format
parent
dea3428c
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
28 deletions
+16
-28
include/yaml-cpp/binary.h
include/yaml-cpp/binary.h
+2
-1
include/yaml-cpp/node/convert.h
include/yaml-cpp/node/convert.h
+2
-1
include/yaml-cpp/node/detail/iterator.h
include/yaml-cpp/node/detail/iterator.h
+3
-4
include/yaml-cpp/node/detail/node_iterator.h
include/yaml-cpp/node/detail/node_iterator.h
+4
-9
include/yaml-cpp/node/node.h
include/yaml-cpp/node/node.h
+1
-3
include/yaml-cpp/node/type.h
include/yaml-cpp/node/type.h
+1
-7
src/nodeevents.cpp
src/nodeevents.cpp
+2
-2
test/node/node_test.cpp
test/node/node_test.cpp
+1
-1
No files found.
include/yaml-cpp/binary.h
View file @
13130ec2
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
#include "yaml-cpp/dll.h"
#include "yaml-cpp/dll.h"
namespace
YAML
{
namespace
YAML
{
YAML_CPP_API
std
::
string
EncodeBase64
(
const
unsigned
char
*
data
,
std
::
size_t
size
);
YAML_CPP_API
std
::
string
EncodeBase64
(
const
unsigned
char
*
data
,
std
::
size_t
size
);
YAML_CPP_API
std
::
vector
<
unsigned
char
>
DecodeBase64
(
const
std
::
string
&
input
);
YAML_CPP_API
std
::
vector
<
unsigned
char
>
DecodeBase64
(
const
std
::
string
&
input
);
class
YAML_CPP_API
Binary
{
class
YAML_CPP_API
Binary
{
...
...
include/yaml-cpp/node/convert.h
View file @
13130ec2
...
@@ -23,7 +23,8 @@
...
@@ -23,7 +23,8 @@
namespace
YAML
{
namespace
YAML
{
class
Binary
;
class
Binary
;
struct
_Null
;
struct
_Null
;
template
<
typename
T
>
struct
convert
;
template
<
typename
T
>
struct
convert
;
}
// namespace YAML
}
// namespace YAML
namespace
YAML
{
namespace
YAML
{
...
...
include/yaml-cpp/node/detail/iterator.h
View file @
13130ec2
...
@@ -36,10 +36,9 @@ class iterator_base
...
@@ -36,10 +36,9 @@ class iterator_base
:
iterator_base
::
iterator_adaptor_
(
rhs
),
m_pMemory
(
pMemory
)
{}
:
iterator_base
::
iterator_adaptor_
(
rhs
),
m_pMemory
(
pMemory
)
{}
template
<
class
W
>
template
<
class
W
>
iterator_base
(
iterator_base
(
const
iterator_base
<
W
>&
rhs
,
const
iterator_base
<
W
>&
rhs
,
typename
boost
::
enable_if
<
boost
::
is_convertible
<
W
*
,
V
*>
,
typename
boost
::
enable_if
<
boost
::
is_convertible
<
W
*
,
V
*>
,
enabler
>::
type
=
enabler
>::
type
=
enabler
())
enabler
())
:
iterator_base
::
iterator_adaptor_
(
rhs
.
base
()),
:
iterator_base
::
iterator_adaptor_
(
rhs
.
base
()),
m_pMemory
(
rhs
.
m_pMemory
)
{}
m_pMemory
(
rhs
.
m_pMemory
)
{}
...
...
include/yaml-cpp/node/detail/node_iterator.h
View file @
13130ec2
...
@@ -18,11 +18,7 @@
...
@@ -18,11 +18,7 @@
namespace
YAML
{
namespace
YAML
{
namespace
detail
{
namespace
detail
{
struct
iterator_type
{
struct
iterator_type
{
enum
value
{
enum
value
{
None
,
Sequence
,
Map
};
None
,
Sequence
,
Map
};
};
};
template
<
typename
V
>
template
<
typename
V
>
...
@@ -76,10 +72,9 @@ class node_iterator_base
...
@@ -76,10 +72,9 @@ class node_iterator_base
}
}
template
<
typename
W
>
template
<
typename
W
>
node_iterator_base
(
node_iterator_base
(
const
node_iterator_base
<
W
>&
rhs
,
const
node_iterator_base
<
W
>&
rhs
,
typename
boost
::
enable_if
<
boost
::
is_convertible
<
W
*
,
V
*>
,
typename
boost
::
enable_if
<
boost
::
is_convertible
<
W
*
,
V
*>
,
enabler
>::
type
=
enabler
>::
type
=
enabler
())
enabler
())
:
m_type
(
rhs
.
m_type
),
:
m_type
(
rhs
.
m_type
),
m_seqIt
(
rhs
.
m_seqIt
),
m_seqIt
(
rhs
.
m_seqIt
),
m_mapIt
(
rhs
.
m_mapIt
),
m_mapIt
(
rhs
.
m_mapIt
),
...
...
include/yaml-cpp/node/node.h
View file @
13130ec2
...
@@ -104,9 +104,7 @@ class YAML_CPP_API Node {
...
@@ -104,9 +104,7 @@ class YAML_CPP_API Node {
void
force_insert
(
const
Key
&
key
,
const
Value
&
value
);
void
force_insert
(
const
Key
&
key
,
const
Value
&
value
);
private:
private:
enum
Zombie
{
enum
Zombie
{
ZombieNode
};
ZombieNode
};
explicit
Node
(
Zombie
);
explicit
Node
(
Zombie
);
explicit
Node
(
detail
::
node
&
node
,
detail
::
shared_memory_holder
pMemory
);
explicit
Node
(
detail
::
node
&
node
,
detail
::
shared_memory_holder
pMemory
);
...
...
include/yaml-cpp/node/type.h
View file @
13130ec2
...
@@ -9,13 +9,7 @@
...
@@ -9,13 +9,7 @@
namespace
YAML
{
namespace
YAML
{
struct
NodeType
{
struct
NodeType
{
enum
value
{
enum
value
{
Undefined
,
Null
,
Scalar
,
Sequence
,
Map
};
Undefined
,
Null
,
Scalar
,
Sequence
,
Map
};
};
};
}
}
...
...
src/nodeevents.cpp
View file @
13130ec2
...
@@ -11,8 +11,8 @@ void NodeEvents::AliasManager::RegisterReference(const detail::node& node) {
...
@@ -11,8 +11,8 @@ void NodeEvents::AliasManager::RegisterReference(const detail::node& node) {
m_anchorByIdentity
.
insert
(
std
::
make_pair
(
node
.
ref
(),
_CreateNewAnchor
()));
m_anchorByIdentity
.
insert
(
std
::
make_pair
(
node
.
ref
(),
_CreateNewAnchor
()));
}
}
anchor_t
NodeEvents
::
AliasManager
::
LookupAnchor
(
const
detail
::
node
&
node
)
anchor_t
NodeEvents
::
AliasManager
::
LookupAnchor
(
const
{
const
detail
::
node
&
node
)
const
{
AnchorByIdentity
::
const_iterator
it
=
m_anchorByIdentity
.
find
(
node
.
ref
());
AnchorByIdentity
::
const_iterator
it
=
m_anchorByIdentity
.
find
(
node
.
ref
());
if
(
it
==
m_anchorByIdentity
.
end
())
if
(
it
==
m_anchorByIdentity
.
end
())
return
0
;
return
0
;
...
...
test/node/node_test.cpp
View file @
13130ec2
...
@@ -232,7 +232,7 @@ TEST(NodeTest, Bool) {
...
@@ -232,7 +232,7 @@ TEST(NodeTest, Bool) {
}
}
TEST
(
NodeTest
,
AutoBoolConversion
)
{
TEST
(
NodeTest
,
AutoBoolConversion
)
{
#pragma warning(disable
:
4800)
#pragma warning(disable
:
4800)
YAML
::
Node
node
;
YAML
::
Node
node
;
node
[
"foo"
]
=
"bar"
;
node
[
"foo"
]
=
"bar"
;
EXPECT_TRUE
(
static_cast
<
bool
>
(
node
[
"foo"
]));
EXPECT_TRUE
(
static_cast
<
bool
>
(
node
[
"foo"
]));
...
...
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