File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -63,15 +63,11 @@ Input* TransientInput::copy() {/*{{{*/
6363 _assert_ (this ->timesteps .size ()==this ->numtimesteps );
6464 _assert_ (this ->inputs .size ()==this ->numtimesteps );
6565
66- TransientInput* output=NULL ;
67-
68- output = new TransientInput ();
66+ TransientInput* output = new TransientInput ();
6967 output->enum_type = this ->enum_type ;
70- output->numtimesteps = this ->enum_type ;
71-
72- output->timesteps = this ->timesteps ; /* performs a Deep copy*/
73-
68+ output->numtimesteps = this ->numtimesteps ;
7469 for (int i=0 ;i<this ->numtimesteps ;i++){
70+ output->timesteps .push_back (this ->timesteps [i]);
7571 if (this ->inputs [i]){
7672 output->inputs .push_back (this ->inputs [i]->copy ());
7773 }
@@ -81,6 +77,9 @@ Input* TransientInput::copy() {/*{{{*/
8177 }
8278 output->parameters =this ->parameters ;
8379
80+ _assert_ (output->timesteps .size ()==output->numtimesteps );
81+ _assert_ (output->inputs .size ()==output->numtimesteps );
82+
8483 return output;
8584}/* }}}*/
8685void TransientInput::DeepEcho (void ){/* {{{*/
You can’t perform that action at this time.
0 commit comments