mirror of
https://github.com/nasa/trick.git
synced 2024-12-21 22:17:51 +00:00
Fixed indexing problem when reducing number of monte carlo runs
When runs reduced via successive calls to set_num_runs, instead of using pop_front() and front(), use pop_back() and back() Refs #304
This commit is contained in:
parent
261af7930e
commit
70a4ad9e24
@ -108,8 +108,8 @@ void Trick::MonteCarlo::set_num_runs(unsigned int in_num_runs) {
|
||||
runs.push_back(new Trick::MonteRun(this->num_runs++));
|
||||
}
|
||||
while ( (this->num_runs > in_num_runs) && !runs.empty() ) {
|
||||
delete runs.front();
|
||||
runs.pop_front();
|
||||
delete runs.back();
|
||||
runs.pop_back();
|
||||
--this->num_runs;
|
||||
}
|
||||
update_actual_num_runs();
|
||||
|
Loading…
Reference in New Issue
Block a user