diff options
Diffstat (limited to 'src/array.h')
-rw-r--r-- | src/array.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/array.h b/src/array.h index 6571c8a..eeee677 100644 --- a/src/array.h +++ b/src/array.h | |||
@@ -205,6 +205,25 @@ namespace Bu | |||
205 | return core->pData[iIndex]; | 205 | return core->pData[iIndex]; |
206 | } | 206 | } |
207 | 207 | ||
208 | value &get( long iIndex ) | ||
209 | { | ||
210 | _hardCopy(); | ||
211 | if( iIndex < 0 || iIndex >= core->iSize ) | ||
212 | throw ArrayException( | ||
213 | "Index %d out of range 0:%d", iIndex, core->iSize ); | ||
214 | |||
215 | return core->pData[iIndex]; | ||
216 | } | ||
217 | |||
218 | const value &get( long iIndex ) const | ||
219 | { | ||
220 | if( iIndex < 0 || iIndex >= core->iSize ) | ||
221 | throw ArrayException( | ||
222 | "Index %d out of range 0:%d", iIndex, core->iSize ); | ||
223 | |||
224 | return core->pData[iIndex]; | ||
225 | } | ||
226 | |||
208 | value &first() | 227 | value &first() |
209 | { | 228 | { |
210 | _hardCopy(); | 229 | _hardCopy(); |