General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals. Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
This commit is contained in:
parent
aced133a3d
commit
51d348b087
5 changed files with 9 additions and 9 deletions
|
@ -234,7 +234,7 @@ std::optional<u32> MemoryRegionInfo::LinearAllocate(u32 size) {
|
|||
}
|
||||
|
||||
// No sufficient block found
|
||||
return {};
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
void MemoryRegionInfo::Free(u32 offset, u32 size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue