Skip to content

Commit

Permalink
Merge pull request #1129 from bitshares/abitmore-patch-2
Browse files Browse the repository at this point in the history
Fix compiler warnings
  • Loading branch information
oxarbitrage authored Jul 14, 2018
2 parents 7fb2c86 + 3fdf652 commit 4fcbe67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/wallet/include/graphene/wallet/reflect_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ struct static_variant_map_visitor
template< typename T >
result_type operator()( const T& dummy )
{
assert( which == m.which_to_name.size() );
FC_ASSERT( which == m.which_to_name.size(), "This should not happen" );
std::string name = clean_name( fc::get_typename<T>::name() );
m.name_to_which[ name ] = which;
m.which_to_name.push_back( name );
}

static_variant_map m;
int which;
uint16_t which; // 16 bit should be practically enough
};

template< typename StaticVariant >
Expand Down Expand Up @@ -107,6 +107,7 @@ static_variant_map create_static_variant_map()
{
T dummy;
int n = dummy.count();
FC_ASSERT( n <= std::numeric_limits<uint16_t>::max(), "Too many items in this static_variant" );
impl::static_variant_map_visitor vtor;
for( int i=0; i<n; i++ )
{
Expand Down

0 comments on commit 4fcbe67

Please sign in to comment.