Revision 1921 trunk/src/linad99/dmat_acc.cpp

dmat_acc.cpp (revision 1921)
19 19
 */
20 20
 dvector& dmatrix::operator[] (int i)
21 21
 {
22
   #ifdef SAFE_ARRAYS
23 22
     if (i < rowmin())
24 23
     {
25 24
       ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
......
30 29
       ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too high",
31 30
       "dvector& dmatrix::operator[] (int i)", rowmin(), rowmax(), i);
32 31
     }
33
   #endif
34 32
   return *(m+i);
35 33
 }
36 34

  
......
40 38
 */
41 39
const dvector& dmatrix::operator[](int i) const
42 40
 {
43
   #ifdef SAFE_ARRAYS
44 41
     if (i<rowmin())
45 42
     {
46 43
       cerr << "matrix bound exceeded -- row index too low in "
......
53 50
       "dmatrix::operator[]" << "value was" << i;
54 51
       ad_exit(22);
55 52
     }
56
   #endif
57 53
   return *(m+i);
58 54
 }
59 55
#endif

Also available in: Unified diff