Skip to content

Commit

Permalink
STYLE: Declare variables closer to where they are instantiated
Browse files Browse the repository at this point in the history
Declare variables closer to where they are instantiated, and avoid
declaring them prior to the test argument check block.
  • Loading branch information
jhlegarreta authored and hjmjohnson committed Sep 12, 2022
1 parent 02bff35 commit e99228e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ Stapler<VDimension>::Execute()
int
itkSTAPLEImageFilterTest(int argc, char * argv[])
{
StaplerBase * stapler;

if (argc < 5)
{
std::cerr << "Use: " << itkNameOfTestExecutableMacro(argv)
Expand All @@ -194,6 +192,8 @@ itkSTAPLEImageFilterTest(int argc, char * argv[])
return EXIT_FAILURE;
}

StaplerBase * stapler;

if (std::stoi(argv[1]) == 2)
{
stapler = new Stapler<2>;
Expand Down

0 comments on commit e99228e

Please sign in to comment.