Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
39963df0
Commit
39963df0
authored
Sep 17, 2014
by
Tiago Peixoto
Browse files
Fix parsing of boolean property maps in graphml.hpp
This fixes
#186
parent
26150b75
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/boost-workaround/boost/graph/graphml.hpp
View file @
39963df0
...
...
@@ -233,22 +233,26 @@ public:
if
(
m_value_type
==
m_type_names
[
mpl
::
find
<
ValueVector
,
Value
>::
type
::
pos
::
value
])
{
std
::
string
val
=
m_value
;
if
(
m_value_type
==
"boolean"
)
{
if
(
val
==
"true"
||
val
==
"True"
)
val
=
"1"
;
if
(
val
==
"false"
||
val
==
"False"
)
val
=
"0"
;
}
if
(
is_same
<
Value
,
uint8_t
>::
value
)
// chars are stored as ints
{
int
v
=
lexical_cast
<
int
>
(
m_
val
ue
);
int
v
=
lexical_cast
<
int
>
(
val
);
put
(
m_name
,
m_dp
,
m_key
,
uint8_t
(
v
));
}
else
{
if
(
is_same
<
Value
,
boost
::
python
::
object
>::
value
)
{
std
::
string
val
=
base64_decode
(
m_value
);
put
(
m_name
,
m_dp
,
m_key
,
lexical_cast
<
Value
>
(
val
));
}
else
{
put
(
m_name
,
m_dp
,
m_key
,
lexical_cast
<
Value
>
(
m_value
));
}
val
=
base64_decode
(
m_value
);
put
(
m_name
,
m_dp
,
m_key
,
lexical_cast
<
Value
>
(
val
));
}
m_type_found
=
true
;
}
...
...
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