From: Arnaud Giersch Date: Fri, 13 Apr 2018 20:55:30 +0000 (+0200) Subject: Reindent. X-Git-Tag: v3.20~418^2~14 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3a0400738a58c8d3608e387a69b2d109e1e8e840?ds=sidebyside Reindent. --- diff --git a/src/smpi/internals/smpi_replay.cpp b/src/smpi/internals/smpi_replay.cpp index 4744eda445..e9ad9140fc 100644 --- a/src/smpi/internals/smpi_replay.cpp +++ b/src/smpi/internals/smpi_replay.cpp @@ -23,58 +23,41 @@ // From https://stackoverflow.com/questions/7110301/generic-hash-for-tuples-in-unordered-map-unordered-set // This is all just to make std::unordered_map work with std::tuple. If we need this in other places, // this could go into a header file. -namespace hash_tuple{ - template - class hash - { - public: - size_t - operator()(TT const& tt) const - { - return std::hash()(tt); - } - }; +namespace hash_tuple { +template class hash { +public: + size_t operator()(TT const& tt) const { return std::hash()(tt); } +}; - template - inline void hash_combine(std::size_t& seed, T const& v) - { - seed ^= hash_tuple::hash()(v) + 0x9e3779b9 + (seed<<6) + (seed>>2); - } +template inline void hash_combine(std::size_t& seed, T const& v) +{ + seed ^= hash_tuple::hash()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); +} - // Recursive template code derived from Matthieu M. - template ::value - 1> - class HashValueImpl - { - public: - static void apply(size_t& seed, Tuple const& tuple) - { - HashValueImpl::apply(seed, tuple); - hash_combine(seed, std::get(tuple)); - } - }; +// Recursive template code derived from Matthieu M. +template ::value - 1> class HashValueImpl { +public: + static void apply(size_t& seed, Tuple const& tuple) + { + HashValueImpl::apply(seed, tuple); + hash_combine(seed, std::get(tuple)); + } +}; - template - class HashValueImpl - { - public: - static void apply(size_t& seed, Tuple const& tuple) - { - hash_combine(seed, std::get<0>(tuple)); - } - }; +template class HashValueImpl { +public: + static void apply(size_t& seed, Tuple const& tuple) { hash_combine(seed, std::get<0>(tuple)); } +}; - template - class hash> - { - public: - size_t - operator()(std::tuple const& tt) const - { - size_t seed = 0; - HashValueImpl >::apply(seed, tt); - return seed; - } - }; +template class hash> { +public: + size_t operator()(std::tuple const& tt) const + { + size_t seed = 0; + HashValueImpl>::apply(seed, tt); + return seed; + } +}; } XBT_LOG_NEW_DEFAULT_SUBCATEGORY(smpi_replay,smpi,"Trace Replay with SMPI");