forked from OSchip/llvm-project
[pstl] Use logical operator for loop condition in tests
Fix a probable typo in two PSTL tests that causes warnings with GCC. Patch by Jonathan Wakely (jwakely). Reviewed By: zoecarver Differential Revision: https://reviews.llvm.org/D102327
This commit is contained in:
parent
7c2afd5899
commit
7f607ac6af
|
@ -81,7 +81,7 @@ test(const std::size_t bits)
|
|||
for (auto r : res)
|
||||
{
|
||||
std::size_t i = r, isub = 0;
|
||||
for (; i < n1 & isub < n2; ++i, ++isub)
|
||||
for (; i < n1 && isub < n2; ++i, ++isub)
|
||||
in[i] = sub[isub];
|
||||
invoke_on_all_policies(test_one_policy(), in.begin(), in.begin() + n1, sub.begin(), sub.begin() + n2,
|
||||
std::equal_to<T>());
|
||||
|
|
|
@ -71,7 +71,7 @@ test()
|
|||
{
|
||||
Sequence<T> in(n1, [](std::size_t) { return T(0); });
|
||||
std::size_t i = r, isub = 0;
|
||||
for (; i < n1 & isub < n2; ++i, ++isub)
|
||||
for (; i < n1 && isub < n2; ++i, ++isub)
|
||||
in[i] = value;
|
||||
|
||||
invoke_on_all_policies(test_one_policy(), in.begin(), in.begin() + n1, n2, value, std::equal_to<T>());
|
||||
|
|
Loading…
Reference in New Issue