Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
loco-3d
Multicontact-api
Commits
3d3c408d
Commit
3d3c408d
authored
May 18, 2020
by
Pierre Fernbach
Browse files
ContactPatch: update serialization for beckward compatibility
parent
7c455b65
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/multicontact-api/scenario/contact-patch.hpp
View file @
3d3c408d
...
...
@@ -76,9 +76,15 @@ struct ContactPatchTpl : public serialization::Serializable<ContactPatchTpl<_Sca
}
template
<
class
Archive
>
void
load
(
Archive
&
ar
,
const
unsigned
int
/*
version
*/
)
{
void
load
(
Archive
&
ar
,
const
unsigned
int
version
)
{
ar
>>
boost
::
serialization
::
make_nvp
(
"placement"
,
m_placement
);
ar
>>
boost
::
serialization
::
make_nvp
(
"contact_model"
,
m_contact_model
);
if
(
version
>=
1
)
{
ar
>>
boost
::
serialization
::
make_nvp
(
"contact_model"
,
m_contact_model
);
}
else
{
double
mu
;
ar
>>
boost
::
serialization
::
make_nvp
(
"mu"
,
mu
);
m_contact_model
=
ContactModel
(
mu
);
}
}
BOOST_SERIALIZATION_SPLIT_MEMBER
()
// why is it required ? using only serialize() lead to compilation error,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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