Revision 1921 trunk/src/linad99/ivec7.cpp

ivec7.cpp (revision 1921)
29 29
 */
30 30
 int& ivector::operator[] (int i)
31 31
 {
32
   #ifdef SAFE_ARRAYS
33 32
   if (!v)
34 33
   {
35 34
       cerr << "\nattempting to acces non-allocated ivector in "
......
47 46
     ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- index too low",
48 47
     "int& ivector::operator[] (int i)", indexmin(), indexmax(), i);
49 48
   }
50
   #endif
51 49
   return(*(v+i));
52 50
 }
53 51

  
......
57 55
 */
58 56
 int& ivector::operator() (int i)
59 57
 {
60
   #ifdef SAFE_ARRAYS
61 58
   if (!v)
62 59
   {
63 60
     cerr << "\nattempting to acces non-allocated ivector in "
......
75 72
     ADMB_ARRAY_BOUNDS_ERROR("array bound exceeded -- index too low",
76 73
     "int& ivector::operator() (int i)", indexmin(), indexmax(), i);
77 74
   }
78
   #endif
79 75
   return(*(v+i));
80 76
 }
81 77

  
......
85 81
 */
86 82
const int& ivector::operator[](int i) const
87 83
 {
88
   #ifdef SAFE_ARRAYS
89 84
     if (!v)
90 85
     {
91 86
       cerr << "\nattempting to acces non-allocated ivector in "
......
108 103
       cerr << endl;
109 104
       ad_exit(1);
110 105
     }
111
   #endif
112 106
   return(*(v+i));
113 107
 }
114 108

  
......
118 112
 */
119 113
const int& ivector::operator()(int i) const
120 114
 {
121
   #ifdef SAFE_ARRAYS
122 115
     if (!v)
123 116
     {
124 117
       cerr << "\nattempting to acces non-allocated ivector in "
......
141 134
       cerr << endl;
142 135
       ad_exit(1);
143 136
     }
144
   #endif
145 137
   return(*(v+i));
146 138
 }
147 139
#endif

Also available in: Unified diff