Browse Source

MeshTools: fix Clang warning about implicit cast changing a value.

Magnum/MeshTools/RemoveDuplicates.h:373:30: Requested here: Implicit
conversion from 'std::size_t' (aka 'unsigned long') to 'float' changes
value from 18446744073709551615 to 18446744073709551616
[-Wimplicit-int-float-conversion].

Not that it would really matter at this scale, but thanks anyway.
pull/449/head
Vladimír Vondruš 6 years ago
parent
commit
6f2e4c2981
  1. 2
      src/Magnum/MeshTools/RemoveDuplicates.h

2
src/Magnum/MeshTools/RemoveDuplicates.h

@ -232,7 +232,7 @@ template<class IndexType, class Vector> std::size_t removeDuplicatesFuzzyIndexed
/* Make epsilon so large that std::size_t can index all vectors inside the /* Make epsilon so large that std::size_t can index all vectors inside the
bounds. */ bounds. */
epsilon = Math::max(epsilon, typename Vector::Type((minmax.second-minmax.first).max()/~std::size_t{})); epsilon = Math::max(epsilon, typename Vector::Type((minmax.second-minmax.first).max()/static_cast<typename Vector::Type>(~std::size_t{})));
/* Table containing original vector index for each discretized vector. /* Table containing original vector index for each discretized vector.
Reserving more buckets than necessary (i.e. as if each vector was Reserving more buckets than necessary (i.e. as if each vector was

Loading…
Cancel
Save