Changeset 5284 for source/ariba/utility/serialization
- Timestamp:
- Jul 24, 2009, 3:23:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/utility/serialization/DataStream.hpp
r4619 r5284 44 44 #include <boost/type_traits/make_unsigned.hpp> 45 45 46 #include <cassert> 46 47 #include <iostream> 47 48 #include <vector> … … 331 332 bits.setLength(index); 332 333 return bits; 334 } 335 336 finline uint8_t* bytes( size_t length ) { 337 assert((index%bits.word_width)==0); 338 if (!isMeasure()) { 339 bits.ensureLength( index + length * 8); 340 uint8_t* buffer = (uint8_t*)bits.getBuffer()+(index/bits.word_width); 341 index += length*8; 342 return buffer; 343 } else { 344 index += length*8; 345 return NULL; 346 } 333 347 } 334 348
Note:
See TracChangeset
for help on using the changeset viewer.