Revision 1921 trunk/src/linad99/i4arr.cpp

i4arr.cpp (revision 1921)
225 225
 */
226 226
    i3_array& i4_array::operator ( ) (int i)
227 227
    {
228
#     if defined(SAFE_ARRAYS)
229 228
      if (i < indexmin() || i > indexmax())
230 229
      {
231 230
        ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
232 231
        "i3_array& i4_array::operator ( ) (int i)", indexmin(), indexmax(), i);
233 232
      }
234
#     endif
235 233
      return t[i];
236 234
    }
237 235

  
......
241 239
 */
242 240
    i3_array& i4_array::operator [] (int i)
243 241
    {
244
#     if defined(SAFE_ARRAYS)
245 242
      if (i < indexmin() || i > indexmax())
246 243
      {
247 244
        ADMB_ARRAY_BOUNDS_ERROR("Index out of bounds",
248 245
        "i3_array& i4_array::operator [] (int i)", indexmin(), indexmax(), i);
249 246
      }
250
#     endif
251 247
      return t[i];
252 248
    }
253 249

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

  
......
301 295
 */
302 296
const i3_array& i4_array::operator[](int i) const
303 297
    {
304
#     if defined(SAFE_ARRAYS)
305 298
      if (i<indexmin() || i>indexmax())
306 299
      {
307 300
        cerr << "Index out of bounds in i4_array::operator () (int)"
308 301
             << endl;
309 302
        ad_exit(1);
310 303
      }
311
#     endif
312 304
      return t[i];
313 305
    }
314 306

  

Also available in: Unified diff