Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #1129

Merged
merged 1 commit into from
Jul 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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