Skip to content

Commit

Permalink
COMP: Remove unused variables
Browse files Browse the repository at this point in the history
Windows build failed when making an unused variable constexpr.
Modules\Core\Common\test\itkVectorContainerTest.cxx(54): error C2127:
'p_null': illegal initialization of 'constexpr' entity with a
non-constant expression

Remove the unused variable to avoid the problem.
  • Loading branch information
hjmjohnson committed Dec 17, 2024
1 parent 17744f8 commit bf64637
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Modules/Core/Common/test/itkVectorContainerTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ itkVectorContainerTest(int, char *[])

// Iterator
{
[[maybe_unused]] constexpr ContainerType::Iterator p_null;
ContainerType::Iterator p = container->Begin();
ContainerType::Iterator p_copy(p);
ContainerType::Iterator p_assign = p;
ContainerType::Iterator p = container->Begin();
ContainerType::Iterator p_copy(p);
ContainerType::Iterator p_assign = p;

while (p != container->End())
{
Expand All @@ -51,10 +50,9 @@ itkVectorContainerTest(int, char *[])

// ConstIterator
{
[[maybe_unused]] constexpr ContainerType::ConstIterator p_null;
ContainerType::ConstIterator p = container->Begin();
ContainerType::ConstIterator p_copy(p);
ContainerType::ConstIterator p_assign = p;
ContainerType::ConstIterator p = container->Begin();
ContainerType::ConstIterator p_copy(p);
ContainerType::ConstIterator p_assign = p;

while (p != container->End())
{
Expand Down

0 comments on commit bf64637

Please sign in to comment.