mirror of
https://github.com/monero-project/monero.git
synced 2025-08-06 08:04:19 -04:00
serialization: massage pair casting to remove user-defined-cast warnings
Similar to: https://github.com/sstsimulator/sst-core/pull/1315
This commit is contained in:
parent
125622d5bd
commit
a2f336d22f
1 changed files with 2 additions and 1 deletions
|
@ -132,7 +132,8 @@ bool do_serialize_container(Archive<true> &ar, C &v)
|
|||
if (i != v.begin())
|
||||
ar.delimit_array();
|
||||
using serializable_value_type = typename ::serialization::detail::serializable_value_type<C>::type;
|
||||
if(!::serialization::detail::serialize_container_element(ar, (serializable_value_type&)*i))
|
||||
auto &i_ref = const_cast<serializable_value_type&>(reinterpret_cast<const serializable_value_type&>(*i));
|
||||
if(!::serialization::detail::serialize_container_element(ar, i_ref))
|
||||
return false;
|
||||
if (!ar.good())
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue