From 871017b53c7ae7b9de2b713e3c1d20a9e6d0015a Mon Sep 17 00:00:00 2001 From: Philippe Groarke Date: Sat, 29 Sep 2018 11:53:10 -0400 Subject: [PATCH] ring_test : Fix MSVC conversion warnings. xutility(2414): warning C4244: '=': conversion from 'double' to 'int', possible loss of data xutility(2414): warning C4244: '=': conversion from 'const double' to 'int', possible loss of data --- SG14_test/ring_test.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/SG14_test/ring_test.cpp b/SG14_test/ring_test.cpp index 5aa3fb80..46b12550 100644 --- a/SG14_test/ring_test.cpp +++ b/SG14_test/ring_test.cpp @@ -3,9 +3,9 @@ #include "ring.h" #include -#include #include #include +#include #include #include #include @@ -167,27 +167,27 @@ static void copy_popper_test() static void reverse_iterator_test() { - std::array A; - sg14::ring_span r(A.begin(), A.end()); - const sg14::ring_span c(A.begin(), A.end()); + std::array A; + sg14::ring_span r(A.begin(), A.end()); + const sg14::ring_span c(A.begin(), A.end()); r.push_back(1); r.push_back(2); r.push_back(3); r.push_back(4); - std::vector v(3); + std::vector v(3); std::copy(r.begin(), r.end(), v.begin()); - assert((v == std::vector{2,3,4})); + assert((v == std::vector{2,3,4})); std::copy(r.cbegin(), r.cend(), v.begin()); - assert((v == std::vector{2,3,4})); + assert((v == std::vector{2,3,4})); std::copy(r.rbegin(), r.rend(), v.begin()); - assert((v == std::vector{4,3,2})); + assert((v == std::vector{4,3,2})); std::copy(r.crbegin(), r.crend(), v.begin()); - assert((v == std::vector{4,3,2})); + assert((v == std::vector{4,3,2})); static_assert(std::is_same::value, ""); static_assert(std::is_same::value, "");