diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2008-06-07 07:00:09 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2008-06-07 07:00:09 +0000 |
| commit | a153962ffe93e70f2419efeab904b515c99c2eda (patch) | |
| tree | a41cb06283025598fcecead56daaf2cfc4a3f6fe /src/archive.h | |
| parent | 3ac57795fe8e28915523de6dd95e336a3eaa8064 (diff) | |
| download | libbu++-a153962ffe93e70f2419efeab904b515c99c2eda.tar.gz libbu++-a153962ffe93e70f2419efeab904b515c99c2eda.tar.bz2 libbu++-a153962ffe93e70f2419efeab904b515c99c2eda.tar.xz libbu++-a153962ffe93e70f2419efeab904b515c99c2eda.zip | |
Fixed the bugs in the archive system. Both the List container and FString had
inconsistancies when archiving compared to their STL counterparts, they are now
compatible on every system I can imagine. Also, List now uses a long instead
of an int for sizing, and the other containers should as well. I'll check on
that later.
That means that the files will all be larger on a 64 bit system, but such is
life. The same thing happens when you use STL classes. There may be other
inconsistancies down the road, we'll see.
Diffstat (limited to 'src/archive.h')
| -rw-r--r-- | src/archive.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/archive.h b/src/archive.h index 95c8c0c..1d57724 100644 --- a/src/archive.h +++ b/src/archive.h | |||
| @@ -256,10 +256,10 @@ namespace Bu | |||
| 256 | Archive &operator>>( Archive &ar, Hash<key,value> &h ) | 256 | Archive &operator>>( Archive &ar, Hash<key,value> &h ) |
| 257 | { | 257 | { |
| 258 | h.clear(); | 258 | h.clear(); |
| 259 | uint32_t nSize; | 259 | long nSize; |
| 260 | ar >> nSize; | 260 | ar >> nSize; |
| 261 | 261 | ||
| 262 | for( uint32_t j = 0; j < nSize; j++ ) | 262 | for( long j = 0; j < nSize; j++ ) |
| 263 | { | 263 | { |
| 264 | key k; value v; | 264 | key k; value v; |
| 265 | ar >> k >> v; | 265 | ar >> k >> v; |
| @@ -285,10 +285,10 @@ namespace Bu | |||
| 285 | Archive &operator>>( Archive &ar, List<value> &h ) | 285 | Archive &operator>>( Archive &ar, List<value> &h ) |
| 286 | { | 286 | { |
| 287 | h.clear(); | 287 | h.clear(); |
| 288 | uint32_t nSize; | 288 | long nSize; |
| 289 | ar >> nSize; | 289 | ar >> nSize; |
| 290 | 290 | ||
| 291 | for( uint32_t j = 0; j < nSize; j++ ) | 291 | for( long j = 0; j < nSize; j++ ) |
| 292 | { | 292 | { |
| 293 | value v; | 293 | value v; |
| 294 | ar >> v; | 294 | ar >> v; |
| @@ -314,10 +314,10 @@ namespace Bu | |||
| 314 | Archive &operator>>( Archive &ar, Set<value> &h ) | 314 | Archive &operator>>( Archive &ar, Set<value> &h ) |
| 315 | { | 315 | { |
| 316 | h.clear(); | 316 | h.clear(); |
| 317 | uint32_t nSize; | 317 | long nSize; |
| 318 | ar >> nSize; | 318 | ar >> nSize; |
| 319 | 319 | ||
| 320 | for( uint32_t j = 0; j < nSize; j++ ) | 320 | for( long j = 0; j < nSize; j++ ) |
| 321 | { | 321 | { |
| 322 | value v; | 322 | value v; |
| 323 | ar >> v; | 323 | ar >> v; |
