aboutsummaryrefslogtreecommitdiff
path: root/src/archive.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-06-07 05:30:58 +0000
committerMike Buland <eichlan@xagasoft.com>2008-06-07 05:30:58 +0000
commit555ba77568b6faf18ebaed06cd08615deab2d8e3 (patch)
treedb4586b7849b1fbdc045c36b386dac0345b82d99 /src/archive.cpp
parentdc95fa94c1a8bb7249034d6fd2e61f80df48b317 (diff)
downloadlibbu++-555ba77568b6faf18ebaed06cd08615deab2d8e3.tar.gz
libbu++-555ba77568b6faf18ebaed06cd08615deab2d8e3.tar.bz2
libbu++-555ba77568b6faf18ebaed06cd08615deab2d8e3.tar.xz
libbu++-555ba77568b6faf18ebaed06cd08615deab2d8e3.zip
This is a testing version. Nothing should be broken, but I won't gurantee it.
I wouldn't update to this just yet, if you have problems, back off a rev. I'm trying to update the code to work on both 32bit, and 64bit systems, and hopefully anything else that comes along. Currently some of the archive code is broken, testing must be done on both archetectures.
Diffstat (limited to 'src/archive.cpp')
-rw-r--r--src/archive.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/archive.cpp b/src/archive.cpp
index 610dc7b..d6ad18d 100644
--- a/src/archive.cpp
+++ b/src/archive.cpp
@@ -89,12 +89,12 @@ Bu::Archive &Bu::Archive::operator<<(uint64_t p)
89{ 89{
90 write( &p, sizeof(p) ); 90 write( &p, sizeof(p) );
91 return *this; 91 return *this;
92} 92}/*
93Bu::Archive &Bu::Archive::operator<<(long p) 93Bu::Archive &Bu::Archive::operator<<(long p)
94{ 94{
95 write( &p, sizeof(p) ); 95 write( &p, sizeof(p) );
96 return *this; 96 return *this;
97} 97}*/
98Bu::Archive &Bu::Archive::operator<<(float p) 98Bu::Archive &Bu::Archive::operator<<(float p)
99{ 99{
100 write( &p, sizeof(p) ); 100 write( &p, sizeof(p) );
@@ -155,12 +155,12 @@ Bu::Archive &Bu::Archive::operator>>(uint64_t &p)
155{ 155{
156 read( &p, sizeof(p) ); 156 read( &p, sizeof(p) );
157 return *this; 157 return *this;
158} 158}/*
159Bu::Archive &Bu::Archive::operator>>(long &p) 159Bu::Archive &Bu::Archive::operator>>(long &p)
160{ 160{
161 read( &p, sizeof(p) ); 161 read( &p, sizeof(p) );
162 return *this; 162 return *this;
163} 163}*/
164Bu::Archive &Bu::Archive::operator>>(float &p) 164Bu::Archive &Bu::Archive::operator>>(float &p)
165{ 165{
166 read( &p, sizeof(p) ); 166 read( &p, sizeof(p) );
@@ -371,9 +371,9 @@ Bu::Archive &Bu::operator>>( Bu::Archive &ar, std::string &s )
371 371
372uint32_t Bu::Archive::getID( const void *ptr ) 372uint32_t Bu::Archive::getID( const void *ptr )
373{ 373{
374 if( hPtrID.has( (int)ptr ) ) 374 if( hPtrID.has( (ptrdiff_t)ptr ) )
375 return hPtrID.get( (int)ptr ); 375 return hPtrID.get( (ptrdiff_t)ptr );
376 hPtrID.insert( (int)ptr, nNextID ); 376 hPtrID.insert( (ptrdiff_t)ptr, nNextID );
377 return nNextID++; 377 return nNextID++;
378} 378}
379 379
@@ -393,7 +393,7 @@ void Bu::Archive::assocPtrID( void **ptr, uint32_t id )
393 393
394void Bu::Archive::readID( const void *ptr, uint32_t id ) 394void Bu::Archive::readID( const void *ptr, uint32_t id )
395{ 395{
396 hPtrID.insert( id, (int)ptr ); 396 hPtrID.insert( id, (ptrdiff_t)ptr );
397 397
398 if( hPtrDest.has( id ) ) 398 if( hPtrDest.has( id ) )
399 { 399 {