aboutsummaryrefslogtreecommitdiff
path: root/src/list.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2010-04-23 15:14:00 +0000
committerMike Buland <eichlan@xagasoft.com>2010-04-23 15:14:00 +0000
commit801e7de1f85656746d832508baf4583907826420 (patch)
tree6e2639b6904ee8bcef2781420741124948c17f2c /src/list.h
parentd8a8c482b2f6b09ee8995b9563397a9b9bd135e8 (diff)
downloadlibbu++-801e7de1f85656746d832508baf4583907826420.tar.gz
libbu++-801e7de1f85656746d832508baf4583907826420.tar.bz2
libbu++-801e7de1f85656746d832508baf4583907826420.tar.xz
libbu++-801e7de1f85656746d832508baf4583907826420.zip
Minor updates to the List class, unchecked corner cases.
The CsvWriter now writes csv. It understands both excel formatting and c-style, which I made up myself (it's just c-style escape sequences). Sha1 is converted to work with the CryptoHash API and it does indeed work.
Diffstat (limited to 'src/list.h')
-rw-r--r--src/list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/list.h b/src/list.h
index 6d2246e..3979b63 100644
--- a/src/list.h
+++ b/src/list.h
@@ -871,6 +871,8 @@ namespace Bu
871 */ 871 */
872 value &first() 872 value &first()
873 { 873 {
874 if( core->pFirst->pValue == NULL )
875 throw Bu::ExceptionBase("Attempt to read first element from empty list.");
874 _hardCopy(); 876 _hardCopy();
875 return *core->pFirst->pValue; 877 return *core->pFirst->pValue;
876 } 878 }
@@ -881,6 +883,8 @@ namespace Bu
881 */ 883 */
882 const value &first() const 884 const value &first() const
883 { 885 {
886 if( core->pFirst->pValue == NULL )
887 throw Bu::ExceptionBase("Attempt to read first element from empty list.");
884 return *core->pFirst->pValue; 888 return *core->pFirst->pValue;
885 } 889 }
886 890