mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-11 08:30:55 +00:00
Reserves a more appropriate amount of data.
This commit is contained in:
parent
555c2a4377
commit
1471a35bb8
@ -127,7 +127,7 @@ template<class T> std::shared_ptr<Storage::Disk::Track>
|
||||
std::size_t post_data_bytes, uint8_t post_data_value,
|
||||
std::size_t expected_track_bytes) {
|
||||
Storage::Disk::PCMSegment segment;
|
||||
segment.data.reserve(expected_track_bytes);
|
||||
segment.data.reserve(expected_track_bytes * 8);
|
||||
T shifter(segment.data);
|
||||
|
||||
// output the index mark
|
||||
@ -192,6 +192,7 @@ void Encoder::output_short(uint16_t value) {
|
||||
uint16_t mask = 0x8000;
|
||||
while(mask) {
|
||||
target_.push_back(!!(value & mask));
|
||||
mask >>= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user