Quiet harmless compiler warnings
This commit is contained in:
parent
7bd47af88e
commit
d462be0e92
2 changed files with 12 additions and 14 deletions
|
|
@ -111,27 +111,27 @@ struct storage_ops<N, T, Ts...> {
|
||||||
template<int N>
|
template<int N>
|
||||||
struct storage_ops<N> {
|
struct storage_ops<N> {
|
||||||
static void del(int n, void *data) {
|
static void del(int n, void *data) {
|
||||||
FC_ASSERT( !"Internal error: static_variant tag is invalid.");
|
FC_THROW_EXCEPTION( fc::assert_exception, "Internal error: static_variant tag is invalid.");
|
||||||
}
|
}
|
||||||
static void con(int n, void *data) {
|
static void con(int n, void *data) {
|
||||||
FC_ASSERT( !"Internal error: static_variant tag is invalid." );
|
FC_THROW_EXCEPTION( fc::assert_exception, "Internal error: static_variant tag is invalid." );
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename visitor>
|
template<typename visitor>
|
||||||
static typename visitor::result_type apply(int n, void *data, visitor& v) {
|
static typename visitor::result_type apply(int n, void *data, visitor& v) {
|
||||||
FC_ASSERT( !"Internal error: static_variant tag is invalid." );
|
FC_THROW_EXCEPTION( fc::assert_exception, "Internal error: static_variant tag is invalid." );
|
||||||
}
|
}
|
||||||
template<typename visitor>
|
template<typename visitor>
|
||||||
static typename visitor::result_type apply(int n, void *data, const visitor& v) {
|
static typename visitor::result_type apply(int n, void *data, const visitor& v) {
|
||||||
FC_ASSERT( !"Internal error: static_variant tag is invalid." );
|
FC_THROW_EXCEPTION( fc::assert_exception, "Internal error: static_variant tag is invalid." );
|
||||||
}
|
}
|
||||||
template<typename visitor>
|
template<typename visitor>
|
||||||
static typename visitor::result_type apply(int n, const void *data, visitor& v) {
|
static typename visitor::result_type apply(int n, const void *data, visitor& v) {
|
||||||
FC_ASSERT( !"Internal error: static_variant tag is invalid." );
|
FC_THROW_EXCEPTION( fc::assert_exception, "Internal error: static_variant tag is invalid." );
|
||||||
}
|
}
|
||||||
template<typename visitor>
|
template<typename visitor>
|
||||||
static typename visitor::result_type apply(int n, const void *data, const visitor& v) {
|
static typename visitor::result_type apply(int n, const void *data, const visitor& v) {
|
||||||
FC_ASSERT( !"Internal error: static_variant tag is invalid." );
|
FC_THROW_EXCEPTION( fc::assert_exception, "Internal error: static_variant tag is invalid." );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -278,8 +278,7 @@ public:
|
||||||
if(_tag == impl::position<X, Types...>::pos) {
|
if(_tag == impl::position<X, Types...>::pos) {
|
||||||
return *reinterpret_cast<X*>(storage);
|
return *reinterpret_cast<X*>(storage);
|
||||||
} else {
|
} else {
|
||||||
FC_ASSERT( !"static_variant does not contain a value of type",
|
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
|
||||||
"type ${t}", ("t",fc::get_typename<X>::name()) );
|
|
||||||
// std::string("static_variant does not contain value of type ") + typeid(X).name()
|
// std::string("static_variant does not contain value of type ") + typeid(X).name()
|
||||||
// );
|
// );
|
||||||
}
|
}
|
||||||
|
|
@ -293,8 +292,7 @@ public:
|
||||||
if(_tag == impl::position<X, Types...>::pos) {
|
if(_tag == impl::position<X, Types...>::pos) {
|
||||||
return *reinterpret_cast<const X*>(storage);
|
return *reinterpret_cast<const X*>(storage);
|
||||||
} else {
|
} else {
|
||||||
FC_ASSERT( !"static_variant does not contain a value of type",
|
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
|
||||||
"type ${t}", ("t",fc::get_typename<X>::name()) );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
template<typename visitor>
|
template<typename visitor>
|
||||||
|
|
|
||||||
|
|
@ -788,7 +788,7 @@ string format_string( const string& format, const variant_object& args )
|
||||||
variants result;
|
variants result;
|
||||||
result.reserve( std::max(aa.size(),ba.size()) );
|
result.reserve( std::max(aa.size(),ba.size()) );
|
||||||
auto num = std::max(aa.size(),ba.size());
|
auto num = std::max(aa.size(),ba.size());
|
||||||
for( uint64_t i = 0; i < num; ++i )
|
for( unsigned i = 0; i < num; ++i )
|
||||||
{
|
{
|
||||||
if( aa.size() > i && ba.size() > i )
|
if( aa.size() > i && ba.size() > i )
|
||||||
result[i] = aa[i] + ba[i];
|
result[i] = aa[i] + ba[i];
|
||||||
|
|
@ -815,7 +815,7 @@ string format_string( const string& format, const variant_object& args )
|
||||||
variants result;
|
variants result;
|
||||||
result.reserve( std::max(aa.size(),ba.size()) );
|
result.reserve( std::max(aa.size(),ba.size()) );
|
||||||
auto num = std::max(aa.size(),ba.size());
|
auto num = std::max(aa.size(),ba.size());
|
||||||
for( uint64_t i = 0; i < num; --i )
|
for( unsigned i = 0; i < num; --i )
|
||||||
{
|
{
|
||||||
if( aa.size() > i && ba.size() > i )
|
if( aa.size() > i && ba.size() > i )
|
||||||
result[i] = aa[i] - ba[i];
|
result[i] = aa[i] - ba[i];
|
||||||
|
|
@ -844,7 +844,7 @@ string format_string( const string& format, const variant_object& args )
|
||||||
variants result;
|
variants result;
|
||||||
result.reserve( std::max(aa.size(),ba.size()) );
|
result.reserve( std::max(aa.size(),ba.size()) );
|
||||||
auto num = std::max(aa.size(),ba.size());
|
auto num = std::max(aa.size(),ba.size());
|
||||||
for( uint64_t i = 0; i < num; ++i )
|
for( unsigned i = 0; i < num; ++i )
|
||||||
{
|
{
|
||||||
if( aa.size() > i && ba.size() > i )
|
if( aa.size() > i && ba.size() > i )
|
||||||
result[i] = aa[i] * ba[i];
|
result[i] = aa[i] * ba[i];
|
||||||
|
|
@ -869,7 +869,7 @@ string format_string( const string& format, const variant_object& args )
|
||||||
variants result;
|
variants result;
|
||||||
result.reserve( std::max(aa.size(),ba.size()) );
|
result.reserve( std::max(aa.size(),ba.size()) );
|
||||||
auto num = std::max(aa.size(),ba.size());
|
auto num = std::max(aa.size(),ba.size());
|
||||||
for( uint64_t i = 0; i < num; ++i )
|
for( unsigned i = 0; i < num; ++i )
|
||||||
{
|
{
|
||||||
if( aa.size() > i && ba.size() > i )
|
if( aa.size() > i && ba.size() > i )
|
||||||
result[i] = aa[i] / ba[i];
|
result[i] = aa[i] / ba[i];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue