Skip to content

Commit 05e1541

Browse files
hjmjohnsonclaude
andcommitted
STYLE: Remove unused joinElements and clean up VoxBoCUB test temp file
Remove the now-unused joinElements helper from itkMetaImageIO.cxx, as its only call site was replaced with a ConvertNumberToString loop. Add temp file cleanup in the VoxBoCUB precision sub-test. Addresses review comments from @N-Dekker and @greptile-apps on PR #6003. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 203f858 commit 05e1541

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

Modules/IO/Meta/src/itkMetaImageIO.cxx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,6 @@
2828

2929
#include <set>
3030

31-
// Function to join strings with a delimiter similar to python's ' '.join([1, 2, 3 ])
32-
template <typename ContainerType, typename DelimiterType, typename StreamType>
33-
static auto
34-
joinElements(const ContainerType & elements, const DelimiterType & delimiter, StreamType & strs) -> void
35-
{
36-
for (size_t i = 0; i < elements.size(); ++i)
37-
{
38-
strs << elements[i];
39-
if (i != elements.size() - 1)
40-
{
41-
strs << delimiter;
42-
}
43-
}
44-
}
45-
4631
namespace itk
4732
{
4833
// Explicitly set std::numeric_limits<double>::max_digits10 this will provide

Modules/Nonunit/Review/test/itkVoxBoCUBImageIOTest.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "itkVoxBoCUBImageIO.h"
2424
#include "itkNumberToString.h"
2525
#include "itkTestingMacros.h"
26+
#include "itksys/SystemTools.hxx"
2627

2728
int
2829
itkVoxBoCUBImageIOTest(int argc, char * argv[])
@@ -92,6 +93,7 @@ itkVoxBoCUBImageIOTest(int argc, char * argv[])
9293
ITK_TRY_EXPECT_NO_EXCEPTION(precReader->Update());
9394

9495
const double readSpacing = precReader->GetOutput()->GetSpacing()[0];
96+
itksys::SystemTools::RemoveFile(precFname);
9597
if (readSpacing != hpSpacing)
9698
{
9799
std::cerr << "VoxBoCUB spacing precision loss: wrote " << itk::ConvertNumberToString(hpSpacing)

0 commit comments

Comments
 (0)