Skip to content

Commit

Permalink
basic: workaround MSVC compiler bug with post-increment operator (#1939)
Browse files Browse the repository at this point in the history
Prevent the compiler from optimizing away initialization loops
  • Loading branch information
lakshmih committed May 21, 2024
1 parent b377b85 commit 5ce18c3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test_conformance/basic/test_vector_swizzle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,7 @@ static void makeReference(std::vector<T>& ref)
// single channel lvalue
for (size_t i = 0; i < N; i++)
{
ref[dstIndex * S + i] = 0;
++dstIndex;
ref[dstIndex++ * S + i] = 0;
}

// normal lvalue
Expand Down

0 comments on commit 5ce18c3

Please sign in to comment.