aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-07-26 23:37:42 +0000
committerMike Buland <eichlan@xagasoft.com>2010-07-26 23:37:42 +0000
commitd473e27a38126a58b9a793e6cc62768cd02c0c46 (patch)
tree1167be1e1e4e6a0e2eef0d5789d9c392426d0040
parentb1558182a40a4a61a811a6879b6278894fe1120f (diff)
downloadlibbu++-d473e27a38126a58b9a793e6cc62768cd02c0c46.tar.gz
libbu++-d473e27a38126a58b9a793e6cc62768cd02c0c46.tar.bz2
libbu++-d473e27a38126a58b9a793e6cc62768cd02c0c46.tar.xz
libbu++-d473e27a38126a58b9a793e6cc62768cd02c0c46.zip
Minor helper functions added.
-rw-r--r--src/array.h19
-rw-r--r--src/sha1.h1
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();
diff --git a/src/sha1.h b/src/sha1.h
index 6c6ee37..ea8c256 100644
--- a/src/sha1.h
+++ b/src/sha1.h
@@ -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