From d9ac0531b32effe372c8b53b644b7bea443bf644 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Wed, 2 Nov 2016 01:31:48 +0100 Subject: [PATCH] Fix warning about unused typedef. --- include/vectorwrapper/vectorwrapper.inl | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/vectorwrapper/vectorwrapper.inl b/include/vectorwrapper/vectorwrapper.inl index 1d2dca1..66552ea 100644 --- a/include/vectorwrapper/vectorwrapper.inl +++ b/include/vectorwrapper/vectorwrapper.inl @@ -360,7 +360,10 @@ namespace vwr { template inline Vec::type> operator+ (const Vec& parLeft, const Vec& parRight) { +#if defined(VWR_STATIC_CAST_RESULTS) typedef typename VectorWrapperInfo::type>::scalar_type scalar_type; +#endif + static_assert(static_cast(VectorWrapperInfo::dimensions) == static_cast(VectorWrapperInfo::dimensions), "Dimensions mismatch"); Vec::type> retval; for (int z = 0; z < VectorWrapperInfo::dimensions; ++z) { @@ -374,7 +377,10 @@ namespace vwr { } template inline Vec::type> operator- (const Vec& parLeft, const Vec& parRight) { +#if defined(VWR_STATIC_CAST_RESULTS) typedef typename VectorWrapperInfo::type>::scalar_type scalar_type; +#endif + static_assert(static_cast(VectorWrapperInfo::dimensions) == static_cast(VectorWrapperInfo::dimensions), "Dimensions mismatch"); Vec::type> retval; for (int z = 0; z < VectorWrapperInfo::dimensions; ++z) { @@ -388,7 +394,10 @@ namespace vwr { } template inline Vec::type> operator* (const Vec& parLeft, const Vec& parRight) { +#if defined(VWR_STATIC_CAST_RESULTS) typedef typename VectorWrapperInfo::type>::scalar_type scalar_type; +#endif + static_assert(static_cast(VectorWrapperInfo::dimensions) == static_cast(VectorWrapperInfo::dimensions), "Dimensions mismatch"); Vec::type> retval; for (int z = 0; z < VectorWrapperInfo::dimensions; ++z) { @@ -402,7 +411,10 @@ namespace vwr { } template inline Vec::type> operator/ (const Vec& parLeft, const Vec& parRight) { +#if defined(VWR_STATIC_CAST_RESULTS) typedef typename VectorWrapperInfo::type>::scalar_type scalar_type; +#endif + static_assert(static_cast(VectorWrapperInfo::dimensions) == static_cast(VectorWrapperInfo::dimensions), "Dimensions mismatch"); Vec::type> retval; for (int z = 0; z < VectorWrapperInfo::dimensions; ++z) {