From fd810d5e292c402fa9ff43d7f2f84a574ef7d566 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Wed, 23 Oct 2024 14:47:02 +0400 Subject: [PATCH] workaround fix for old android sdk with old boost(with missing pfr) --- src/common/boost_serialization_maps.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/boost_serialization_maps.h b/src/common/boost_serialization_maps.h index 2bd9fda3..d27bf52a 100644 --- a/src/common/boost_serialization_maps.h +++ b/src/common/boost_serialization_maps.h @@ -4,8 +4,9 @@ #pragma once #include + #ifndef MOBILE_WALLET #include - +#endif #define BEGIN_BOOST_SERIALIZATION() template void serialize(t_archive &_arch, const unsigned int ver) { template struct TAssertEquality { @@ -37,8 +38,11 @@ template struct TAssertEquality { fields to the structure but forgets to update the serialization map, the compilation will fail. Any update to "num_fields" must be accompanied by a thorough review of the serialization map to ensure no fields are omitted. **********************************************************************************************************************************/ -#define END_BOOST_SERIALIZATION_TOTAL_FIELDS(num_fields) static_assert(num_fields == boost::pfr::tuple_size::type>::value, "Unexpected number of fields!"); } - +#ifndef MOBILE_WALLET + #define END_BOOST_SERIALIZATION_TOTAL_FIELDS(num_fields) static_assert(num_fields == boost::pfr::tuple_size::type>::value, "Unexpected number of fields!"); } +#else + #define END_BOOST_SERIALIZATION_TOTAL_FIELDS(num_fields) END_BOOST_SERIALIZATION() +#endif #define BOOST_SERIALIZATION_CURRENT_ARCHIVE_VER(current_version) static const unsigned int current_boost_version_serialization_version = current_version;