Revision 1921 trunk/src/linad99/i5arr.cpp

i5arr.cpp (revision 1921)
200 200
 */
201 201
    i4_array& i5_array::operator ( ) (int i)
202 202
    {
203
#     if defined(SAFE_ARRAYS)
204 203
      if (i < indexmin() || i > indexmax())
205 204
      {
206 205
        ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
207 206
        "i4_array& i5_array::operator ( ) (int i)", indexmin(), indexmax(), i);
208 207
      }
209
#     endif
210 208
      return t[i];
211 209
    }
212 210

  
......
216 214
 */
217 215
    i4_array& i5_array::operator [] (int i)
218 216
    {
219
#     if defined(SAFE_ARRAYS)
220 217
      if (i < indexmin() || i > indexmax())
221 218
      {
222 219
        ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
223 220
        "i4_array& i5_array::operator [] (int i)", indexmin(), indexmax(), i);
224 221
      }
225
#     endif
226 222
      return t[i];
227 223
    }
228 224

  
......
268 264
 */
269 265
const i4_array& i5_array::operator()(int i) const
270 266
    {
271
#     if defined(SAFE_ARRAYS)
272 267
      if (i<indexmin() || i>indexmax())
273 268
      {
274 269
        cerr << "Index out of bounds in i5_array::operator () (int)"
275 270
             << endl;
276 271
        ad_exit(1);
277 272
      }
278
#     endif
279 273
      return t[i];
280 274
    }
281 275

  
......
285 279
 */
286 280
const i4_array& i5_array::operator[](int i) const
287 281
    {
288
#     if defined(SAFE_ARRAYS)
289 282
      if (i<indexmin() || i>indexmax())
290 283
      {
291 284
        cerr << "Index out of bounds in i5_array::operator () (int)"
292 285
             << endl;
293 286
        ad_exit(1);
294 287
      }
295
#     endif
296 288
      return t[i];
297 289
    }
298 290

  

Also available in: Unified diff