Revision 1921 trunk/src/linad99/f3arr1.cpp

f3arr1.cpp (revision 1921)
49 49
 */
50 50
    dvar_vector& dvar3_array::operator () (int k, int i)
51 51
    {
52
      #ifdef SAFE_ARRAYS
53 52
      if (k < slicemin())
54 53
      {
55 54
         ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- slice index too low",
......
62 61
         "dvar_vector& dvar3_array::operator () (int k, int i)",
63 62
         slicemin(), slicemax(), k);
64 63
      }
65
      #endif
66 64
      return ( (elem(k))(i) );
67 65
    }
68 66

  
......
72 70
 */
73 71
 dvar_matrix& dvar3_array::operator[] (int i)
74 72
 {
75
   #ifdef SAFE_ARRAYS
76 73
   if (i < slicemin())
77 74
   {
78 75
     ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- slice index too low",
......
85 82
     "dvar_matrix& dvar3_array::operator [] (int i)",
86 83
     slicemin(), slicemax(), i);
87 84
   }
88
   #endif
89 85
   return( t[i]);
90 86
 }
91 87

  
......
95 91
 */
96 92
 dvar_matrix& dvar3_array::operator() (int i)
97 93
 {
98
   #ifdef SAFE_ARRAYS
99 94
   if (!allocated(*this))
100 95
   {
101 96
       cerr << "trying to access an unallocated object" << endl;
......
113 108
     "dvar_matrix& dvar3_array::operator () (int i)",
114 109
     slicemin(), slicemax(), i);
115 110
   }
116
   #endif
117 111
   return( t[i]);
118 112
 }
119 113
#endif

Also available in: Unified diff