Skip to content
Snippets Groups Projects
Commit 2443198f authored by Victor Poughon's avatar Victor Poughon
Browse files

Fix coverity #1457789

parent 50b15c7b
No related branches found
No related tags found
No related merge requests found
......@@ -817,18 +817,22 @@ std::string CommandLineLauncher::DisplayParameterHelp(const Parameter::Pointer &
if (type == ParameterType_Choice)
{
std::vector<std::string> keys = dynamic_cast<ChoiceParameter*>(param.GetPointer())->GetChoiceKeys();
std::vector<std::string> names = dynamic_cast<ChoiceParameter*>(param.GetPointer())->GetChoiceNames();
ChoiceParameter* paramDown = dynamic_cast<ChoiceParameter*>(param.GetPointer());
if (paramDown)
{
std::vector<std::string> keys = paramDown->GetChoiceKeys();
std::vector<std::string> names = paramDown->GetChoiceNames();
oss << "[";
for(unsigned int i=0; i<keys.size(); i++)
oss << "[";
for(unsigned int i=0; i<keys.size(); i++)
{
oss<<keys[i];
if( i != keys.size()-1 )
oss << "/";
oss<<keys[i];
if( i != keys.size()-1 )
oss << "/";
}
oss << "]";
oss << "]";
}
}
if(m_Application->IsMandatory(paramKey))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment