Fix args parser

parent 95343ee9
......@@ -68,8 +68,8 @@ int main( int argc, char** argv ) {
// Parse command line parameters
tools::Args args;
#ifndef READXML
args.addOption("grid-size-x", 'x', "Number of cell in x direction");
args.addOption("grid-size-y", 'y', "Number of cell in y direction");
args.addOption("grid-size-x", 'x', "Number of cells in x direction");
args.addOption("grid-size-y", 'y', "Number of cells in y direction");
args.addOption("output-basepath", 'o', "Output base file name");
#endif
......
......@@ -162,6 +162,10 @@ public:
struct option o = {0, 0, 0, 0};
m_options.push_back(o);
// Update const char* in m_options
for (size_t i = 0; i < m_optionInfo.size(); i++)
m_options[i].name = m_optionInfo[i].longOption.c_str();
while (true) {
int optionIndex = 0;
......
Markdown is supported
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