mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 22:00:04 +00:00
Replace boost::optional with std::optional where possible
This commit is contained in:
parent
87e16c80ac
commit
d37a2270d6
30 changed files with 104 additions and 106 deletions
|
@ -131,8 +131,7 @@ ResultCode CIAFile::WriteTitleMetadata() {
|
|||
auto content_count = container.GetTitleMetadata().GetContentCount();
|
||||
content_written.resize(content_count);
|
||||
|
||||
auto title_key = container.GetTicket().GetTitleKey();
|
||||
if (title_key) {
|
||||
if (auto title_key = container.GetTicket().GetTitleKey()) {
|
||||
decryption_state->content.resize(content_count);
|
||||
for (std::size_t i = 0; i < content_count; ++i) {
|
||||
auto ctr = tmd.GetContentCTRByIndex(i);
|
||||
|
@ -339,7 +338,7 @@ InstallStatus InstallCIA(const std::string& path,
|
|||
Service::AM::CIAFile installFile(
|
||||
Service::AM::GetTitleMediaType(container.GetTitleMetadata().GetTitleID()));
|
||||
|
||||
bool title_key_available = container.GetTicket().GetTitleKey().is_initialized();
|
||||
bool title_key_available = container.GetTicket().GetTitleKey().has_value();
|
||||
|
||||
for (std::size_t i = 0; i < container.GetTitleMetadata().GetContentCount(); i++) {
|
||||
if ((container.GetTitleMetadata().GetContentTypeByIndex(static_cast<u16>(i)) &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue