diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-02-14 09:35:25 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-02-14 09:35:25 +0100 |
commit | 0c4b311242f5ce61a6ae4374e490f5ad1524e5ad (patch) | |
tree | eb1ee6bf4bc5d243ff378b0e43d1eed48b9e51c0 | |
parent | bcc873b805f8ec74422752da530b71d8d762bded (diff) | |
download | yosys-0c4b311242f5ce61a6ae4374e490f5ad1524e5ad.tar.gz yosys-0c4b311242f5ce61a6ae4374e490f5ad1524e5ad.tar.bz2 yosys-0c4b311242f5ce61a6ae4374e490f5ad1524e5ad.zip |
Fixed more visual studio warnings
-rw-r--r-- | kernel/hashlib.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/hashlib.h b/kernel/hashlib.h index 972a8b8d8..280b1693f 100644 --- a/kernel/hashlib.h +++ b/kernel/hashlib.h @@ -95,9 +95,7 @@ template<typename P, typename Q> struct hash_ops<std::pair<P, Q>> { return a == b; } static inline unsigned int hash(std::pair<P, Q> a) { - hash_ops<P> p_ops; - hash_ops<Q> q_ops; - return mkhash(p_ops.hash(a.first), q_ops.hash(a.second)); + return mkhash(hash_ops<P>::hash(a.first), hash_ops<Q>::hash(a.second)); } }; @@ -111,8 +109,8 @@ template<typename... T> struct hash_ops<std::tuple<T...>> { } template<size_t I = 0> static inline typename std::enable_if<I != sizeof...(T), unsigned int>::type hash(std::tuple<T...> a) { - hash_ops<typename std::tuple_element<I, std::tuple<T...>>::type> element_ops; - return mkhash(hash<I+1>(a), element_ops.hash(std::get<I>(a))); + typedef hash_ops<typename std::tuple_element<I, std::tuple<T...>>::type> element_ops_t; + return mkhash(hash<I+1>(a), element_ops_t::hash(std::get<I>(a))); } }; |