Changeset f4f135e in git


Ignore:
Timestamp:
Jul 19, 2018, 4:33:22 PM (5 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '8e0ad00ce244dfd0756200662572aef8402f13d5')
Children:
603a9894476eb0322bbfbcb93b58502145498740
Parents:
2956e79f7ae4282b9ffde4eafb8b3203df65b398
Message:
opt: factory/variable.cc: prune
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/variable.cc

    r2956e79 rf4f135e  
    262262{
    263263  if (alpha.level()==LEVELBASE) return;
    264   int i, n = strlen( var_names_ext );
    265   ASSERT (n+1 >= -alpha.level(), "wrong variable");
    266264  int last_var=-alpha.level();
     265  if ((last_var <= 0)||(var_names_ext==NULL)) return;
    267266  if (last_var == 1)
    268267  {
     
    274273    return;
    275274  }
     275  ASSERT (strlen(var_names_ext)+1 >= -alpha.level(), "wrong variable");
    276276  char * newvarnames = new char [last_var+1];
    277   for ( i = 0; i < last_var; i++ )
     277  ext_entry * newalgext = new ext_entry [last_var];
     278  for (int i = 0; i < last_var; i++ )
     279  {
    278280    newvarnames[i] = var_names_ext[i];
     281    newalgext[i] = algextensions[i];
     282  }
    279283  newvarnames[last_var] = 0;
    280284  delete [] var_names_ext;
    281285  var_names_ext = newvarnames;
    282   ext_entry * newalgext = new ext_entry [last_var];
    283   for ( i = 0; i < last_var; i++ )
    284     newalgext[i] = algextensions[i];
    285286  delete [] algextensions;
    286287  algextensions = newalgext;
Note: See TracChangeset for help on using the changeset viewer.