Revision 1921 trunk/src/linad99/i3arr1.cpp

i3arr1.cpp (revision 1921)
20 20
 */
21 21
    int& i3_array::operator () (int k, int i, int j)
22 22
    {
23
      #ifdef SAFE_ARRAYS
24 23
      if (k < slicemin())
25 24
      {
26 25
        ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
......
33 32
        "ivector& i3_array::operator() (int k, int i, int j)",
34 33
        slicemin(), slicemax(), k);
35 34
      }
36
      #endif
37 35
      return ( (elem(k))(i,j) );
38 36
    }
39 37

  
......
43 41
 */
44 42
    ivector& i3_array::operator () (int k, int i)
45 43
    {
46
      #ifdef SAFE_ARRAYS
47 44
      if (k < slicemin())
48 45
      {
49 46
        ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
......
56 53
        "ivector& i3_array::operator() (int k, int i)",
57 54
        slicemin(), slicemax(), k);
58 55
      }
59
      #endif
60 56
      return ( (elem(k))(i) );
61 57
    }
62 58

  
......
66 62
 */
67 63
 imatrix& i3_array::operator[] (int i)
68 64
 {
69
   #ifdef SAFE_ARRAYS
70 65
   if (i < slicemin())
71 66
   {
72 67
     ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
......
77 72
     ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too high",
78 73
     "imatrix& i3_array::operator[] (int i)", slicemin(), slicemax(), i);
79 74
   }
80
   #endif
81 75
   return(t[i]);
82 76
 }
83 77

  
......
87 81
 */
88 82
 imatrix& i3_array::operator() (int i)
89 83
 {
90
   #ifdef SAFE_ARRAYS
91 84
   if (i < slicemin())
92 85
   {
93 86
     ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too low",
......
98 91
     ADMB_ARRAY_BOUNDS_ERROR("matrix bound exceeded -- row index too high",
99 92
     "imatrix& i3_array::operator() (int i)", slicemin(), slicemax(), i);
100 93
   }
101
   #endif
102 94
   return(t[i]);
103 95
 }
104 96
#endif

Also available in: Unified diff