File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ PR2Wrapper PR2; // Holds all of the settings and data for PR2
260260
261261void PR2Wrapper::generate_nondet_operator_mappings () {
262262 // Map from operator id to nondet index
263- vector<int >* nondet_index_map = new vector<int >(PR2.proxy ->get_operators ().size ());
263+ vector<int > nondet_index_map = vector<int >(PR2.proxy ->get_operators ().size ());
264264
265265 // assert that the mappings are empty
266266 assert (PR2.general .nondet_mapping .empty ());
@@ -291,7 +291,7 @@ void PR2Wrapper::generate_nondet_operator_mappings() {
291291 PR2.general .nondet_mapping [nondet_name_to_index[op.get_nondet_name ()]].size () - 1 ;
292292 op.nondet_index = nondet_name_to_index[op.get_nondet_name ()];
293293 op.nondet_outcome = PR2.general .nondet_outcome_mapping [op.get_id ()];
294- (* nondet_index_map) [op.get_id ()] = op.nondet_index ;
294+ nondet_index_map[op.get_id ()] = op.nondet_index ;
295295
296296 for (auto eff : op.get_all_effects ()) {
297297 for (auto cond : eff.get_conditions ()) {
@@ -302,7 +302,7 @@ void PR2Wrapper::generate_nondet_operator_mappings() {
302302 }
303303 }
304304
305- PR2.proxy ->set_nondet_index_map (* nondet_index_map);
305+ PR2.proxy ->set_nondet_index_map (nondet_index_map);
306306}
307307
308308void PR2OperatorProxy::update_nondet_info () {
Original file line number Diff line number Diff line change 88#include " deadend.h"
99
1010Simulator::Simulator (shared_ptr<pr2_search::PR2Search> eng) : engine(eng) {
11+ if (current_state)
12+ delete current_state;
1113 current_state = PR2.proxy ->generate_new_init ();
1214}
1315
1416void Simulator::setup_simulation (PR2State * init) {
17+ if (current_state)
18+ delete current_state;
1519 if (init)
1620 current_state = new PR2State (*init);
1721 else
You can’t perform that action at this time.
0 commit comments