Skip to content

Commit 162220d

Browse files
committed
Avoid shadowing "range"
Just move it to an inner block which is the first (and only) use of this declaration.
1 parent 07ef750 commit 162220d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

unit/util/range.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ SCENARIO("range tests", "[core][util][range]")
1919
list.emplace_back("abc");
2020
list.emplace_back("cdef");
2121
list.emplace_back("acdef");
22-
auto range = make_range(list);
23-
std::size_t total_length = 0;
2422
THEN("Use range-for to compute the total length")
2523
{
24+
auto range = make_range(list);
25+
std::size_t total_length = 0;
2626
for(const auto &s : range)
2727
total_length += s.length();
2828
REQUIRE(total_length == 12);

0 commit comments

Comments
 (0)