fix warnings
This commit is contained in:
parent
d79855b491
commit
99e1c1fd52
2 changed files with 5 additions and 3 deletions
|
|
@ -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 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];
|
uint32_t _hash[7];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,8 @@ public:
|
||||||
"Type not in static_variant."
|
"Type not in static_variant."
|
||||||
);
|
);
|
||||||
if(_tag == impl::position<X, Types...>::pos) {
|
if(_tag == impl::position<X, Types...>::pos) {
|
||||||
return *reinterpret_cast<X*>(storage);
|
void* tmp(storage);
|
||||||
|
return *reinterpret_cast<X*>(tmp);
|
||||||
} else {
|
} else {
|
||||||
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
|
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()
|
// std::string("static_variant does not contain value of type ") + typeid(X).name()
|
||||||
|
|
@ -298,7 +299,8 @@ public:
|
||||||
"Type not in static_variant."
|
"Type not in static_variant."
|
||||||
);
|
);
|
||||||
if(_tag == impl::position<X, Types...>::pos) {
|
if(_tag == impl::position<X, Types...>::pos) {
|
||||||
return *reinterpret_cast<const X*>(storage);
|
const void* tmp(storage);
|
||||||
|
return *reinterpret_cast<const X*>(tmp);
|
||||||
} else {
|
} else {
|
||||||
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
|
FC_THROW_EXCEPTION( fc::assert_exception, "static_variant does not contain a value of type ${t}", ("t",fc::get_typename<X>::name()) );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue