Commit 2443198f authored by Victor Poughon's avatar Victor Poughon
Browse files

Fix coverity #1457789

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