core/sal: pass commandline parameters by reference
This allows the commandline parameter parser to modify argc, as it finds
arguments for the Fail* client. Additionally argv is correctly null
terminated when removing arguments.
This fixes a bug introduced in eb17e9ef82.
Change-Id: Iabe84530790ecb7c587b0af139127015aad868d5
This commit is contained in:
@ -36,16 +36,20 @@ BaseListener* SimulatorController::resume(void)
|
||||
return m_LstList.getLastFired();
|
||||
}
|
||||
|
||||
void SimulatorController::startup(int argc, char **argv)
|
||||
void SimulatorController::startup(int& argc, char **& argv)
|
||||
{
|
||||
if (argv) {
|
||||
CommandLine::Inst().collect_args(argc, argv);
|
||||
}
|
||||
startup();
|
||||
}
|
||||
|
||||
void SimulatorController::startup()
|
||||
{
|
||||
// Some greetings to the user:
|
||||
std::cout << "[SimulatorController] Initializing..." << std::endl;
|
||||
// TODO: Log-Level?
|
||||
|
||||
if (argv) {
|
||||
CommandLine::Inst().collect_args(argc, argv);
|
||||
}
|
||||
|
||||
// Activate previously added experiments to allow initialization:
|
||||
initExperiments();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user