Browse Source

Animation: why not just cast the thing?

The reinterpret is kinda dangerous, and causes strict aliasing warnings.
pull/445/head
Vladimír Vondruš 6 years ago
parent
commit
f3c2bfb093
  1. 2
      src/Magnum/Animation/Track.h

2
src/Magnum/Animation/Track.h

@ -696,7 +696,7 @@ template<class K, class V, class R
* @see @ref keys(), @ref operator[]()
*/
Containers::StridedArrayView1D<V> values() const {
return reinterpret_cast<const Containers::StridedArrayView1D<V>&>(TrackViewStorage<K>::_values);
return Containers::arrayCast<V>(TrackViewStorage<K>::_values);
}
/**

Loading…
Cancel
Save