Revision 1921 trunk/src/linad99/fvma_acc.cpp

fvma_acc.cpp (revision 1921)
19 19
 */
20 20
    prevariable dvar_matrix::operator () (int i, int j)
21 21
    {
22
      #ifdef SAFE_ARRAYS
23 22
      if (i < rowmin())
24 23
      {
25 24
        ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- index too low",
......
44 43
        "prevariable dvar_matrix::operator () (int i, int j)",
45 44
        elem(i).indexmin(), elem(i).indexmax(), j);
46 45
      }
47
      #endif
48 46
      return ( m[i].va+j );
49 47
    }
50 48

  
......
54 52
 */
55 53
 dvar_vector& dvar_matrix::operator[] (int i)
56 54
 {
57
   #ifdef SAFE_ARRAYS
58 55
   if (i < rowmin())
59 56
   {
60 57
     ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- index too low",
......
67 64
     "prevariable dvar_matrix::operator () (int i, int j)",
68 65
     rowmin(), rowmax(), i);
69 66
   }
70
   #endif
71 67
   return (m[i]);
72 68
 }
73 69

  
......
77 73
 */
78 74
const prevariable dvar_matrix::operator()(int i, int j) const
79 75
    {
80
      #ifdef SAFE_ARRAYS
81 76
        if (i<rowmin())
82 77
        {
83 78
          cerr << "array bound exceeded -- index too low in "
......
106 101
               << " second argument was " << j << endl;
107 102
          ad_exit(24);
108 103
        }
109
      #endif
110 104
      return ( m[i].va+j );
111 105
    }
112 106

  
......
116 110
 */
117 111
const dvar_vector& dvar_matrix::operator[](int i) const
118 112
 {
119
   #ifdef SAFE_ARRAYS
120 113
     if (i<rowmin())
121 114
     {
122 115
       cerr << "matrix bound exceeded -- row index too low in "
......
131 124
             << "value was" << i;
132 125
       ad_exit(22);
133 126
     }
134
   #endif
135 127
   return (m[i]);
136 128
 }
137 129
#endif

Also available in: Unified diff