CDImage: Fix Linux build

This commit is contained in:
Connor McLaughlin 2021-03-27 15:34:15 +10:00
parent 5aa70cf797
commit fa2525324e
2 changed files with 16 additions and 4 deletions

View file

@ -321,8 +321,22 @@ void CDImage::ClearTOC()
void CDImage::CopyTOC(const CDImage* image)
{
m_lba_count = image->m_lba_count;
m_indices = image->m_indices;
m_tracks = image->m_tracks;
m_indices.clear();
m_indices.reserve(image->m_indices.size());
// Damn bitfield copy constructor...
for (const Index& index : image->m_indices)
{
Index new_index;
std::memcpy(&new_index, &index, sizeof(new_index));
m_indices.push_back(new_index);
}
for (const Track& track : image->m_tracks)
{
Track new_track;
std::memcpy(&new_track, &track, sizeof(new_track));
m_tracks.push_back(new_track);
}
m_current_index = nullptr;
m_position_in_index = 0;
m_position_in_track = 0;

View file

@ -135,8 +135,6 @@ public:
BitField<u8, bool, 5, 1> digital_copy_permitted;
BitField<u8, bool, 6, 1> data;
BitField<u8, bool, 7, 1> four_channel_audio;
Control& operator=(const Control& c) { bits = c.bits; return *this; }
};
struct