Changeset 1673386 in git for factory/facFqFactorize.cc


Ignore:
Timestamp:
Apr 11, 2011, 4:00:33 PM (13 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
5f4463c81efc75ad1f905707628cb16a56f6c0d3
Parents:
526e40d402c852186bd63157812aa8c82bb611f6
Message:
replaced arrays by pointers


git-svn-id: file:///usr/local/Singular/svn/trunk@14136 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqFactorize.cc

    r526e40d r1673386  
    198198  CanonicalForm LCBuf= LC (buf, Variable (1));
    199199  CanonicalForm g, gg;
    200   int v [T.length()];
     200  int * v= new int [T.length()];
    201201  for (int i= 0; i < T.length(); i++)
    202202    v[i]= 0;
     
    213213      {
    214214        result.append (prodMod (T, M));
     215        delete [] v;
    215216        return result;
    216217      }
     
    244245            {
    245246              result.append (prodMod (T, M));
     247              delete [] v;
    246248              return result;
    247249            }
     
    257259    {
    258260      result.append (prodMod (T, M));
     261      delete [] v;
    259262      return result;
    260263    }
    261     int v [T.length()];
    262264    for (int i= 0; i < T.length(); i++)
    263265      v[i]= 0;
     
    267269    result.append (prodMod (T, M));
    268270
     271  delete [] v;
    269272  return result;
    270273}
     
    635638  CanonicalForm g, LCBuf= LC (buf, Variable (1));
    636639  CanonicalForm buf2;
    637   int v [T.length()];
     640  int * v= new int [T.length()];
    638641  for (int i= 0; i < T.length(); i++)
    639642    v[i]= 0;
     
    650653      if (T.length() == s)
    651654      {
     655        delete [] v;
    652656        if (recombination)
    653657        {
     
    666670          return CFList (buf);
    667671        }
    668         return result;
    669672      }
    670673
     
    712715            buf /= Lc (buf);
    713716            appendTestMapDown (result, buf, info, source, dest);
     717            delete [] v;
    714718            return result;
    715719          }
     
    726730      buf= reverseShift (buf, evaluation);
    727731      appendTestMapDown (result, buf, info, source, dest);
     732      delete [] v;
    728733      return result;
    729734    }
    730     int v [T.length()];
    731735    for (int i= 0; i < T.length(); i++)
    732736      v[i]= 0;
     
    739743  }
    740744
     745  delete [] v;
    741746  return result;
    742747}
     
    759764  CanonicalForm LCBuf= LC (F, Variable (1));
    760765  CanonicalForm g, buf= F;
    761   int v [T.length()];
     766  int * v= new int [T.length()];
    762767  for (int i= 0; i < T.length(); i++)
    763768    v[i]= 0;
     
    775780      if (T.length() == s)
    776781      {
     782        delete [] v;
    777783        if (recombination)
    778784        {
     
    801807        {
    802808          result.append (buf);
     809          delete [] v;
    803810          return result;
    804811        }
     
    812819    {
    813820      result.append (buf);
     821      delete [] v;
    814822      return result;
    815823    }
    816     int v [T.length()];
    817824    for (int i= 0; i < T.length(); i++)
    818825      v[i]= 0;
     
    822829    result.append (F);
    823830
     831  delete [] v;
    824832  return result;
    825833}
Note: See TracChangeset for help on using the changeset viewer.