diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-23 23:40:02 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2019-09-23 23:40:02 -0400 |
commit | 1c72acfda984f73ddc96d51596f9e761a963944a (patch) | |
tree | ff56fa98c7641fb9890eaf82f3f57ff31959668a /lib/include/array_hash.hpp | |
parent | 3f7f20f21f583ca2de566bea08a87eac4b17ad29 (diff) | |
download | fuse_networks-1c72acfda984f73ddc96d51596f9e761a963944a.tar.gz fuse_networks-1c72acfda984f73ddc96d51596f9e761a963944a.tar.bz2 fuse_networks-1c72acfda984f73ddc96d51596f9e761a963944a.zip |
ran clang-format
Diffstat (limited to 'lib/include/array_hash.hpp')
-rw-r--r-- | lib/include/array_hash.hpp | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/lib/include/array_hash.hpp b/lib/include/array_hash.hpp index 3b35e4a..fd0d0f7 100644 --- a/lib/include/array_hash.hpp +++ b/lib/include/array_hash.hpp @@ -4,24 +4,18 @@ #include <array> #include <unordered_map> -namespace std -{ - template<typename T, size_t N> - struct hash<array<T, N> > - { - typedef array<T, N> argument_type; - typedef size_t result_type; - - result_type operator()(const argument_type& a) const - { - hash<T> hasher; - result_type h = 0; - for (result_type i = 0; i < N; ++i) - { - h = h * 31 + hasher(a[i]); - } - return h; - } - }; -} +namespace std { +template <typename T, size_t N> struct hash<array<T, N>> { + typedef array<T, N> argument_type; + typedef size_t result_type; + result_type operator()(const argument_type& a) const { + hash<T> hasher; + result_type h = 0; + for (result_type i = 0; i < N; ++i) { + h = h * 31 + hasher(a[i]); + } + return h; + } +}; +} // namespace std |