Ubuntu 18.04 Upgrade #3

Merged
RoshanSyed merged 143 commits from github/fork/PBSA/master into master 2019-09-03 16:20:50 +00:00
Showing only changes of commit 80b2341e77 - Show all commits

View file

@ -120,7 +120,8 @@ void fc::reflector<TYPE>::visit( const Visitor& v ) { \
#define FC_REFLECT_ENUM_FROM_STRING( r, enum_type, elem ) \
if( strcmp( s, BOOST_PP_STRINGIZE(elem) ) == 0 ) return enum_type::elem;
#define FC_REFLECT_ENUM_FROM_STRING_CASE( r, enum_type, elem ) \
case enum_type::elem:
#define FC_REFLECT_ENUM( ENUM, FIELDS ) \
namespace fc { \
@ -158,7 +159,15 @@ template<> struct reflector<ENUM> { \
{ \
fc::throw_bad_enum_cast( s, BOOST_PP_STRINGIZE(ENUM) ); \
} \
return ENUM(i);\
ENUM e = ENUM(i); \
switch( e ) \
{ \
BOOST_PP_SEQ_FOR_EACH( FC_REFLECT_ENUM_FROM_STRING_CASE, ENUM, FIELDS ) \
break; \
default: \
fc::throw_bad_enum_cast( s, BOOST_PP_STRINGIZE(ENUM) ); \
} \
return e;\
} \
}; \
}