get rid of boost::optional

This commit is contained in:
Frederic Laing
2018-10-24 22:48:46 +02:00
committed by Frederic Laing
parent aa1cf608ed
commit f53f5e9fee
45 changed files with 250 additions and 243 deletions

View File

@@ -103,12 +103,12 @@ VirtualFile PatchIPS(const VirtualFile& in, const VirtualFile& ips) {
offset += sizeof(u16);
const auto data = ips->ReadByte(offset++);
if (data == boost::none)
if (data )
return nullptr;
if (real_offset + rle_size > in_data.size())
rle_size = static_cast<u16>(in_data.size() - real_offset);
std::memset(in_data.data() + real_offset, data.get(), rle_size);
std::memset(in_data.data() + real_offset, data.value(), rle_size);
} else { // Standard Patch
auto read = data_size;
if (real_offset + read > in_data.size())