Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Tiago Peixoto
graph-tool
Commits
8f91834e
Commit
8f91834e
authored
Dec 31, 2011
by
Tiago Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slight improvements to DynamicMapWrap
parent
311fc510
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/graph/graph_properties.hh
src/graph/graph_properties.hh
+7
-6
No files found.
src/graph/graph_properties.hh
View file @
8f91834e
...
...
@@ -316,7 +316,7 @@ struct convert
if
(
is_same
<
T1
,
uint8_t
>::
value
)
return
convert
<
T1
,
int
>
()(
lexical_cast
<
int
>
(
v
));
else
return
lexical_cast
<
T
ype
1
>
(
v
);
return
lexical_cast
<
T1
>
(
v
);
}
};
...
...
@@ -368,7 +368,8 @@ struct convert<string,python::object>::specific_convert<string,python::object>
// to the desired Key and Value type, which may cause a performance impact,
// since virtual functions are used. Should be used only when property map
// access time is not crucial
template
<
class
Value
,
class
Key
>
template
<
class
Value
,
class
Key
,
template
<
class
T1
,
class
T2
>
class
Converter
=
convert
>
class
DynamicPropertyMapWrap
{
public:
...
...
@@ -437,7 +438,7 @@ private:
{
return
_c_get
(
boost
::
get
(
pmap
,
k
));
}
template
<
class
PMap
>
Value
get_dispatch
(
PMap
pmap
,
const
typename
property_traits
<
PMap
>::
key_type
&
k
,
mpl
::
bool_
<
false
>
)
...
...
@@ -460,11 +461,11 @@ private:
{
throw
ValueException
(
"Property map is not writable."
);
}
private:
PropertyMap
_pmap
;
c
onvert
<
Value
,
val_t
>
_c_get
;
c
onvert
<
val_t
,
Value
>
_c_put
;
C
onvert
er
<
Value
,
val_t
>
_c_get
;
C
onvert
er
<
val_t
,
Value
>
_c_put
;
};
struct
choose_converter
...
...
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