Changeset 4b5098 in git for libpolys/misc


Ignore:
Timestamp:
Nov 29, 2012, 8:50:13 PM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
308a766afffc51141b50332c5e1b2d3849433dce
Parents:
ca5cfe83988bd636394cc6b49509717ad3b17700
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-11-29 20:50:13+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-11-29 23:08:28+01:00
Message:
Assume that intvec should contain at least one entry...
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/misc/intvec.h

    rca5cfe r4b5098  
    2323
    2424  inline intvec(int l = 1)
    25     {
    26       v = (int *)omAlloc0(sizeof(int)*l);
    27       row = l;
    28       col = 1;
    29     }
     25  {
     26    assume(l > 0);
     27    v = (int *)omAlloc0(sizeof(int)*l);
     28    row = l;
     29    col = 1;
     30  }
    3031  intvec(int s, int e);
    3132  intvec(int r, int c, int init);
     
    3536    row = iv->rows();
    3637    col = iv->cols();
     38    assume(row > 0);
     39    assume(col > 0);
    3740    if (row*col>0)
    3841    {
     
    111114  }
    112115#if 0
     116  // TODO: no omalloc Bin (de-)/allocation?
    113117  void* operator new ( size_t size )
    114118  {
Note: See TracChangeset for help on using the changeset viewer.