fix warnings

This commit is contained in:
Daniel Larimer 2015-09-11 08:54:51 -04:00
parent d79855b491
commit 99e1c1fd52
2 changed files with 5 additions and 3 deletions

View file

@ -65,7 +65,7 @@ class sha224
friend bool operator >= ( const sha224& h1, const sha224& h2 );
friend bool operator > ( const sha224& h1, const sha224& h2 );
friend bool operator < ( const sha224& h1, const sha224& h2 );
friend std::size_t hash_value( const sha224& v ) { return ((std::size_t*)v._hash)[1]; }
friend std::size_t hash_value( const sha224& v ) { return uint64_t(v._hash[1])<<32 | v._hash[2]; }
uint32_t _hash[7];
};

View file

@ -284,7 +284,8 @@ public:
"Type not in static_variant."
);
if(_tag == impl::position<X, Types...>::pos) {
return *reinterpret_cast<X*>(storage);
void* tmp(storage);
return *reinterpret_cast<X*>(tmp);
} else {
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
// std::string("static_variant does not contain value of type ") + typeid(X).name()
@ -298,7 +299,8 @@ public:
"Type not in static_variant."
);
if(_tag == impl::position<X, Types...>::pos) {
return *reinterpret_cast<const X*>(storage);
const void* tmp(storage);
return *reinterpret_cast<const X*>(tmp);
} else {
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
}