ams: std::optional -> util::optional
This commit is contained in:
@@ -85,12 +85,12 @@ namespace ams::pgl::srv {
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<os::ProcessId> GetRunningApplicationProcessId() {
|
||||
util::optional<os::ProcessId> GetRunningApplicationProcessId() {
|
||||
os::ProcessId process_id;
|
||||
if (R_SUCCEEDED(pm::shell::GetApplicationProcessIdForShell(std::addressof(process_id)))) {
|
||||
return process_id;
|
||||
} else {
|
||||
return std::nullopt;
|
||||
return util::nullopt;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace ams::pgl::srv {
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result GetContentPath(lr::Path *out, ncm::ContentType type, std::optional<u8> index) const {
|
||||
Result GetContentPath(lr::Path *out, ncm::ContentType type, util::optional<u8> index) const {
|
||||
switch (this->extension_type) {
|
||||
case ExtensionType::Nsp: return this->GetContentPathInNsp(out, type, index);
|
||||
case ExtensionType::Nspd: return this->GetContentPathInNspd(out, type, index);
|
||||
@@ -155,7 +155,7 @@ namespace ams::pgl::srv {
|
||||
return this->program_index;
|
||||
}
|
||||
private:
|
||||
Result GetContentPathInNsp(lr::Path *out, ncm::ContentType type, std::optional<u8> index) const {
|
||||
Result GetContentPathInNsp(lr::Path *out, ncm::ContentType type, util::optional<u8> index) const {
|
||||
/* Create a reader. */
|
||||
auto reader = ncm::PackagedContentMetaReader(this->content_meta_buffer.Get(), this->content_meta_buffer.GetSize());
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace ams::pgl::srv {
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result GetContentPathInNspd(lr::Path *out, ncm::ContentType type, std::optional<u8> index) const {
|
||||
Result GetContentPathInNspd(lr::Path *out, ncm::ContentType type, util::optional<u8> index) const {
|
||||
/* Get the content name. */
|
||||
const char *content_name = nullptr;
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user