ams: std::optional -> util::optional

This commit is contained in:
Michael Scire
2021-07-08 02:37:26 -07:00
parent 9df13781c2
commit a7c14e03b9
59 changed files with 950 additions and 147 deletions

View File

@@ -78,13 +78,13 @@ namespace ams::ncm {
util::SNPrintf(dst, dst_size, "%s.cert", str.data);
}
std::optional<ContentId> GetContentIdFromString(const char *str, size_t len) {
util::optional<ContentId> GetContentIdFromString(const char *str, size_t len) {
if (len < ContentIdStringLength) {
return std::nullopt;
return util::nullopt;
}
ContentId content_id;
return GetBytesFromString(std::addressof(content_id), sizeof(content_id), str, ContentIdStringLength) ? std::optional<ContentId>(content_id) : std::nullopt;
return GetBytesFromString(std::addressof(content_id), sizeof(content_id), str, ContentIdStringLength) ? util::optional<ContentId>(content_id) : util::nullopt;
}
}