Skip to content

Commit f65d20f

Browse files
committed
ENH: Remove unused variable warning from static analysis
An unnecessary variable 'elements' was being generated even if variable was not a vector of vectors.
1 parent e4e7c9f commit f65d20f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

GenerateCLP/GenerateCLP.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1923,7 +1923,6 @@ void GenerateTCLAPAssignment(std::ostream & sout, const ModuleDescription & modu
19231923
sout << pit->GetName() << "Temp.size(); _i++)" << EOL << std::endl;
19241924
sout << " {" << EOL << std::endl;
19251925
sout << " std::vector<std::string> words;" << EOL << std::endl;
1926-
sout << " std::vector<" << pit->GetArgType() << "> elements;" << EOL << std::endl;
19271926
sout << " words.clear();" << EOL << std::endl;
19281927
if ((*pit).GetTag() == "file")
19291928
{
@@ -1936,6 +1935,7 @@ void GenerateTCLAPAssignment(std::ostream & sout, const ModuleDescription & modu
19361935
}
19371936
if (IsVectorOfVectors(*pit))
19381937
{
1938+
sout << " std::vector<" << pit->GetArgType() << "> elements;" << EOL << std::endl;
19391939
sout << " for (unsigned int _j= 0; _j < words.size(); _j++)" << EOL << std::endl;
19401940
sout << " {" << EOL << std::endl;
19411941
sout << " elements.push_back("
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Input Fiducial File = input.fcsv
2+
Output Fiducial File = output.fcsv

0 commit comments

Comments
 (0)