Browse Source

Math: adapt to CORRADE_NODISCARD changes.

Yeah, this is how it should have been since the beginning.
pull/686/head
Vladimír Vondruš 3 months ago
parent
commit
e869cd1aff
  1. 4
      src/Magnum/Math/Swizzle.h

4
src/Magnum/Math/Swizzle.h

@ -149,11 +149,11 @@ Use @ref scatterInto() to update the vector in-place.
@ref Vector4::rgb(), @ref Vector4::xy(), @ref Vector3::xy() @ref Vector4::rgb(), @ref Vector4::xy(), @ref Vector3::xy()
*/ */
#ifdef DOXYGEN_GENERATING_OUTPUT #ifdef DOXYGEN_GENERATING_OUTPUT
template<char ...components, class T> CORRADE_NODISCARD constexpr T scatter(const T& vector, const Vector<sizeof...(components), typename T::Type>& values) template<char ...components, class T> CORRADE_NODISCARD("use scatterInto() to scatter in-place") constexpr T scatter(const T& vector, const Vector<sizeof...(components), typename T::Type>& values)
#else #else
/* Using std::common_type otherwise GCC 4.8 fails to match the arguments /* Using std::common_type otherwise GCC 4.8 fails to match the arguments
in SwizzleTest::scatterOneComponent() */ in SwizzleTest::scatterOneComponent() */
template<char ...components, class T> CORRADE_NODISCARD constexpr T scatter(const T& vector, const typename std::common_type<Vector<sizeof...(components), typename T::Type>>::type& values) template<char ...components, class T> CORRADE_NODISCARD("use scatterInto() to scatter in-place") constexpr T scatter(const T& vector, const typename std::common_type<Vector<sizeof...(components), typename T::Type>>::type& values)
#endif #endif
{ {
return Implementation::scatterRecursive<T, sizeof...(components), components...>(vector, values, 0); return Implementation::scatterRecursive<T, sizeof...(components), components...>(vector, values, 0);

Loading…
Cancel
Save