diff options
-rw-r--r-- | src/array.h | 19 | ||||
-rw-r--r-- | src/sha1.h | 1 |
2 files changed, 20 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(); |
@@ -28,6 +28,7 @@ namespace Bu | |||
28 | virtual void reset(); | 28 | virtual void reset(); |
29 | virtual void setSalt( const Bu::FString &sSalt ); | 29 | virtual void setSalt( const Bu::FString &sSalt ); |
30 | virtual void addData( const void *sData, int iSize ); | 30 | virtual void addData( const void *sData, int iSize ); |
31 | using CryptoHash::addData; | ||
31 | virtual FString getResult(); | 32 | virtual FString getResult(); |
32 | virtual void writeResult( Stream &sOut ); | 33 | virtual void writeResult( Stream &sOut ); |
33 | 34 | ||