From 70f57fab6d4881ab94055213ccc10a3d43858f1e Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sun, 6 Nov 2016 12:14:58 -0800 Subject: tests: Don't use ranged for loop in move tests Some compilers support move semantics but don't support ranged for. --- tests/test_xpath_api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/test_xpath_api.cpp') diff --git a/tests/test_xpath_api.cpp b/tests/test_xpath_api.cpp index 9aa1a34..c1a4968 100644 --- a/tests/test_xpath_api.cpp +++ b/tests/test_xpath_api.cpp @@ -631,8 +631,8 @@ TEST(xpath_api_query_vector) double result = 0; - for (auto& q: qv) - result += q.evaluate_number(xml_node()); + for (size_t i = 0; i < qv.size(); ++i) + result += qv[i].evaluate_number(xml_node()); CHECK(result == 45); } -- cgit v1.2.3