From 41eed2c8babc4aafc0747328498e646f02bbdb8e Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Mon, 5 Sep 2016 21:30:17 +0200 Subject: [PATCH] Warning fix --- include/vectorwrapper/vectorops.hpp | 2 +- include/vectorwrapper/vectorwrapper.inl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/include/vectorwrapper/vectorops.hpp b/include/vectorwrapper/vectorops.hpp index 34375ec..2532531 100644 --- a/include/vectorwrapper/vectorops.hpp +++ b/include/vectorwrapper/vectorops.hpp @@ -12,7 +12,7 @@ namespace vwr { template inline typename std::common_type::scalar_type, typename Vec::scalar_type>::type dot (const Vec& parLeft, const Vec& parRight) { auto retval = parLeft.x() * parRight.x(); - for (int z = 1; z < S; ++z) { + for (std::size_t z = 1; z < S; ++z) { retval += parLeft[z] * parRight[z]; } return retval; diff --git a/include/vectorwrapper/vectorwrapper.inl b/include/vectorwrapper/vectorwrapper.inl index a10ff5c..08d700f 100644 --- a/include/vectorwrapper/vectorwrapper.inl +++ b/include/vectorwrapper/vectorwrapper.inl @@ -42,7 +42,7 @@ namespace vwr { VecGetter::get_at(m_wrapped, 1) = parY; const scalar_type args[sizeof...(Args)] = {parArgs...}; - for (int z = 0; z < sizeof...(Args); ++z) { + for (std::size_t z = 0; z < sizeof...(Args); ++z) { VecGetter::get_at(m_wrapped, z + 2) = args[z]; } } @@ -137,7 +137,6 @@ namespace vwr { assert(parIndex < VectorWrapperInfo::dimensions); typedef T vector_type; typedef typename VectorWrapperInfo::scalar_type scalar_type; - typedef scalar_type (vector_type::*coordinate_property); static_assert(std::is_standard_layout::value, "Can't use this function with this vector_type"); const offsets_array_wrapper oaw((bt::index_range<0, VectorWrapperInfo::dimensions>())); return *reinterpret_cast(reinterpret_cast(&parVec) + oaw.offsets[parIndex]);